Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
The user types three numbers on one line, with a space between them: 4 2 9. The program cuts the line into pieces. 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
The user types three numbers on one line, with a space between them:
4 2 9
. The program cuts the line into pieces.
nums = input().split() print(nums[0] + nums[-1], int(nums[0]) + int(nums[-1]), len(nums))
What does the program print?
13 13 3
49 13 5
4 9 13 3
49 13 3
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A program splits a four-digit number into parts with // and %. What does the program print?
Seven divided by seven is worked out with / and with //. The two results are compared, and then a string and True are each tested against the number one. 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 →