This question already has an answer here:
- Determine the type of an object? 12 answers
Let me say about my program
- It will take a user input
- It will check its int or str
- if it is str it will say, Please enter a number !
- if it is int it will simply print, this is your + user input
Notice : I also need help for the 4th option i don't know how to print a str and that value in same line together
x = raw_input("Enter a Number : ")
if x == str:
print "Please Use number"
else:
print "This is your " + x
Aucun commentaire:
Enregistrer un commentaire