🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Python Operators and Input: all 14 questions

Quiz: Python Operators and Input · Question 8 of 14

How do you read a whole number from the user?

How do you read a whole number from the user?

  1. A.input(int())
  2. B.int(input())
  3. C.input().int
  4. D.number(input())
Answer & explanation

Correct answer: int(input())

input() returns text; int() converts it.

Can you get the rest right without peeking?

Take the timed Quiz: Python Operators and Input quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →