HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Quizzes
  2. /Half of seven is turned into a whole number in two ways: by rounding it and by converting it with int(), for the positive and the negative value. What is the output?
Python ProgrammingMediumHigh School (9–10)Python Basics › Variables and Data TypesPCEP (Python Institute)
StemPy LabCreated by StemPy Lab

Half of seven is turned into a whole number in two ways: by rounding it and by converting it with int(), for the positive and the negative value. a = 7 / 2 print(a, round(a), int(-a), round(-a)) What is the output?

Log in to save
← All Quizzes
← A program converts values with int(), str() and float() before it uses them. What does the program print?Bitwise operators work on the binary digits of whole numbers. Each line below combines 6 and 3, or shifts 1, and compares the result with ==. Pick every comparison that comes out True. More than one may be right. →
More onPython Basics › Variables and Data Types

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. A program turns four floats into whole numbers, three with round() and one with int(). What does…Hard
  2. Whole numbers can be written in binary, octal or hexadecimal, and with underscores. A student…Medium
  3. Two names get new values in one assignment, and the new value of b uses a. What does the program…Easy
  4. A student turns values into numbers with int() and float(). Each line below is tried on its own.…Hard
  5. A program holds a number as text, and multiplies it in two ways. What does the program print?Easy
All questions on this topic →

Problems on this topic

  1. Each of these three programs stops with an error…Easy
  2. Say what the type of each result is, and what value it has. Decide on paper first.Medium
  3. A student wants to swap a and b, and writes…Easy
  4. Trace the programMedium
All problems on this topic →