Toggle Navigation
Games
Blog
Class PIN
Join for Free
Sign in
Toggle Navigation
Games
PIN
Join for Free
Blog
Pricing
Contact us
Help center
Sign in
Study
python data type
0
%
0
0
0
Back
Restart
How do we convert input to a whole number?
int()
Oops!
Okay!
What does float() do?
Converts to a decimal number
Oops!
Okay!
Why do we use type conversion?
To calculate with numbers
Oops!
Okay!
What data type does input() always return?
String
Oops!
Okay!
Which function shows output?
print()
Oops!
Okay!
Write one line that asks for age and prints age + 1
age = int(input("Enter age: ")) / print(age + 1)
Oops!
Okay!
What is wrong with this code? x = input("Enter: ") / print(x + 5)
x is a string
Oops!
Okay!
What will be the output if the user enters 10? age = int(input("Enter your age") / print(age + 5)
15
Oops!
Okay!
write a line correctly that takes a number as input?
num = int(input("Enter a number: "))
Oops!
Okay!
What will be the output if x="3" ? / print( x * 2)
33
Oops!
Okay!
True or False: input() returns an integer .. and why?
False .. it returns string
Oops!
Okay!
Your experience on this site will be improved by allowing cookies.
Allow cookies