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 function prints a value with its own end, and returns another value. Two calls are the arguments of one print() with sep. What does the program print?
Python Programming
Medium
High School (9–10)
Python Basics › Input and Output
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A function prints a value with its own
end
, and returns another value. Two calls are the arguments of one
print()
with
sep
.
def tag(x): print(x, end="-") return x + 5 print(tag(1), tag(2), sep="|")
What does the program print?
1-2-6 7
1-6|2-7
1-2-6|7
6|7
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A function asks a question with input() and a prompt. The user types 4 and presses Enter. Do not count the characters the user types. What text does the program itself write on the screen?
Whole numbers can be written in binary, octal or hexadecimal, and with underscores. A student checks five statements about such literals. Which of these expressions are True? Choose every correct option. →
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 →