Python Programming - Console Input/Output - Discussion

Discussion Forum : Console Input/Output - General Questions (Q.No. 13)
13.
How can you prompt the user with a message and read an integer in a single line?
prompt_integer()
input("Enter an integer: ").to_int()
int(input("Enter an integer: "))
user_prompt("Enter an integer: ").read_integer()
Answer: Option
Explanation:
To prompt the user with a message and read an integer in a single line, you can use int(input("Enter an integer: ")).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.