Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A greeting program asks for a name and then for a number. The user types Ann, presses Enter, types 3 and presses Enter again. What is shown on the screen?
Python Programming
Medium
High School (9–10)
Python Basics › Input and Output
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A greeting program asks for a name and then for a number. The user types
Ann
, presses Enter, types
3
and presses Enter again.
name = input() n = int(input()) print(name[0] * n, name + str(n), sep=":")
What is shown on the screen?
AAA:Ann3
A3:Ann3
AAA Ann3
AAA:Ann 3
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← One line of arithmetic, with no brackets at all, uses the remainder operator, a product, floor division and a sum. What does the program print?
A program converts values with int(), str() and float() before it uses them. What does the program print? →
More on
Python Basics › Input and Output
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
Write a program that asks for the length and the width of a rectangle in centimetres, as numbers…
Medium
A program asks two questions. The Input box has these two lines: India and then Pune…
Easy
A student wrote a program that asks for the price of an item…
Medium
Which function (int or float) would you use to read each value? …
Medium
All problems on this topic →