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
‘Types’ Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Tag Archives: types

Mastery 9 – Basic types

Here im going to prove that i know the basic types of Python.

– Integers

 An integer number
x = 7
x + 3 = 10
It canbe used for calculations

– Floats

It´s a decimal number
x = .7 
1.4456
0.1234

– Strings

Is a word, you need to tell pyhton that you are writing a string and not a variable with “
x = “Hello World”
It can be added to integers and other strings
print (x,”I´m jose carlos and im”,18,”years old”)
Hello World I´m jose calros and im 18 years old

-Tuples

An uneditable list, to make one you need to use parenthesis
x = (1,2,3)

-Lists

A list that can me edited, to make one you need to use brackets
x = [6,1,9,”hola”,”hello”]

-Dictionaries 

You link elements with other type, you create one with {} and link each element with :, it is comonly used to map strings to integers.
x = {“hola”:1,”jose”:2, 15:15,”new word”:0}

You can modify the type of a variable with preset functions, sometimes it doesnt work
x = 12
str(x)
“12”
x = “hola”
int(x)
Error

Basic types and their use in c++

Today I will write about the basic types in c++.  First of all, what is a type? According to Allen B. Downey, a type is a set of values. The fundamental c++ types are the following: Void It is an empty set of values. It is an incomplete type that cannot be completed. Bool It […]

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).