What to do for type()? Don't know, searched multiple websites with no sucess. Please Help!


#1

def spam():

print type('spam')
print type(42)
print type(3.78)
print type ('int')

#2
print(type("spam"))
...

#3

says I need to print 'int'(integer??)


#4

That's because of your last type. You have to print the type of a number, not of "int".


#5

Decimal or integer
3.22 322


#6

This is one of the harder course lessons for me, I am at 28% of Python


#7

If the lesson wants you to get int as a type, what of those two do you think will need to use? (You already answered yourself in the reply...).


#8

Probably a Decimal, I am not Completely sure of what I am doing on this lesson. Although however I already have tried both and failed both times. Thanks for the advice!


#9

That's not possible. An int is an integer, so 322 should work. Show your code. Maybe the error is in the 3.78 instead of "int".


#10

def spam():

print type('I like to dance')
print type(42.00)
print type(328)

That is what I entered, don't know Y it won't work. Maybe because 42 isn't really a decimal?


#11

Every number with dots is considered a float.


#12

I got it thanks for All OF THE ADVICE. I will start another conversation when I am in need of help. THANKS AGAIN!!