C-17-Q004mediumsingle_mcq
To convert the keyboard input into an integer in int(input('Please enter your mark: ')), the function used is:
To convert the keyboard input into an integer in int(input('Please enter your mark: ')), the function used is:
- a
str() - b
int() - c
float() - d
eval()
ব্যাখ্যা
input() always returns a string, so it must be wrapped in int() to convert the typed text into an integer for numerical comparison. The int() function performs exactly this string-to-integer conversion.