← Back to User Input
Question 173
Square A Number
Square A Number
Ask for a whole number with the prompt Number? (space after the question mark), convert it with int(), and print a sentence in the form <num> squared is <square>. Input: one line, an integer. The prompt is part of the output and input() does not move to a new line, so the prompt and the sentence share one output line.
Expected Output:
Number? 5 squared is 25= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
User Input
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.