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 program turns four floats into whole numbers, three with round() and one with int(). What does the program print?
Python Programming
Hard
High School (9–10)
Python Basics › Variables and Data Types
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program turns four floats into whole numbers, three with
round()
and one with
int()
.
print(round(2.5), round(3.5), round(-1.5), int(-1.7))
What does the program print?
2 4 -2 -2
3 4 -2 -2
3 4 -1 -1
2 4 -2 -1
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← 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.
A function picks a word for a temperature with if, elif and a final return. What does the program print? →
More on
Python Basics › Variables and Data Types
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
Each of these three programs stops with an error…
Easy
Say what the type of each result is, and what value it has. Decide on paper first.
Medium
A student wants to swap a and b, and writes…
Easy
Trace the program
Medium
All problems on this topic →