Question Detail
Question
In the 'Guess the Number Game Python Code,' what is the purpose of
int(input('Guess the secret number: '))?
Correct Answer
Option B is the correct answer.
Detailed Explanation
The
input() function always returns user input as a string. The int() function then converts this string into an integer, which is essential for numerical comparisons with the secret_number.
Hint
User input is always a string by default. What operation is needed if you want to perform arithmetic or direct numerical comparison?