16/19 Functions topic


don't understand at all



Can you be a bit more specific? What is the problematic part for you?

You don't understand the concept of function, of data types or you have a trouble with the understanding of type function?


all its saying is to print out the type of an int, a float, and a str

so do

print type(4) <---- any number as long as its an int(no decimal)
print type(4.0) <---- any number as long as its a float (has decimal)
print type("Derp") <---- any string(Make sure it has quote marks to make it a string)

what this does is prints out the 'type' of the value in the parenthesis and inside the console it shows what type it is
so the console will look like this

<type 'int'>
<type 'float'>
<type 'str'>