Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
‘#Mastery26’ Articles at TC101 Fall 2015, Page 2
Introduction to Programming Python and C++

Tag Archives: #Mastery26

#MASTERY26

https://youtu.be/j7wxYTnRWUQ

Creation and use of strings in Python

MASTERY 26: Creation and use of matrixes in C++

(Credit of the image goes to https://flic.kr/p/5tH1Ch) Matrixes are very similar to arrays and vectors.  A matrix can be considered a two-dimensional vector. They’re actually vectors of rows. And here’s a Power Point where I show you how to use them. Have fun. MASTERY 26

MASTERY 26: Creation and use of matrixes in C++

Matrixes are very similar to arrays and vectors.  A matrix can be considered a two-dimensional vector. They’re actually vectors of rows. And here’s a Power Point where I show you how to use them. Have fun. MASTERY 26

Masteries 26 & 28

Mastery 28 – User input (text based) in Python (basic) input(“prompt”) is one of the many Built-in Functions of the Python interpreter. The prompt is written as an output, the function recieves an input from the user and converts it to a data type, usually a string. For this data to have a meaning in the program, it should be saved inside a […]

Masteries 26 & 28

Mastery 28 – User input (text based) in Python (basic) input(“prompt”) is one of the many Built-in Functions of the Python interpreter. The prompt is written as an output, the function recieves an input from the user and converts it to a data type, usually a string. For this data to have a meaning in the program, it should be saved inside a […]

Creation and Use of Strings

       A string is an extract of text used in a program. This text can be displayed as an output, but it can also be taken from the user as an input. A string is considered to be everything that is written between quotation marks. For example: “House”, “car”, “Anna”, “187.0”, “+”, “.”, etc.

       Yes, punctuation marks, numbers, and even symbols as considered to be strings if they are written between quotation marks. To explain this more efficiently, you can see the following code in which a pair of numbers are considered as strings.



      This is what happens when you run it:


       As you can see, the program was expected to out the sum of x plus y, not to output the text “x+y”. This happened because we typed the function between quotation marks.

        When you want to get a number as an input, you need to place the word “float” or “int” before “input” so the computer knows what type of input is being taken:


X=float(input(“Give me a number”))

Y=int(input(“Give me another number”))

       Just like this, we can type “str” before the word “input” but it is not necessary. Whenever you set an input without placing any word before it, the computer automatically assumes it should be considered as a string. But in case you want to type it anyway, this is how you do it:


X=str(input(“What´s your name?”))

#Mastery24 and #Mastery 26

Hey today we are going to learn how to : Use of loops with “for” Creation and use of lists in Python #Mastery24 : #Mastery26 :

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).