PYnative

Python Programming

  • Learn Python
  • Exercises
  • Quizzes
  • Code Editor
  • Tricks
Home » Python » Quizzes » Python Numbers Quiz

Python Numbers Quiz

Updated on: August 24, 2022 | 3 Comments

This Python Numbers quiz provides Multiple Choice Questions(MCQ) to get familiar with Python Number data types and their functions. This online quiz will help you to improve your understanding of Python Numbers.

Read Python numbers to solve this quiz

  • The quiz contains 12 Questions. Solve 8 correct questions to pass the test.
  • You will have to read all the given answers and click over the correct answer.

1. What is the output of the following number comparison function call

print( (1.1 + 2.2) == 3.3 )

 
 

2. What is the output of the following code

print(0b101)
print(0o10)
print(0x1F)
 
 
 

3. What is the output of the following isinstance() function

from numbers import Number
from decimal import Decimal
from fractions import Fraction

print(isinstance(2.0, Number))
print(isinstance(Decimal('2.0'), Number))
print(isinstance(Fraction(2, 1), Number))
print(isinstance("2", Number))
 
 
 
 

4. Select which is right for Python integers

 
 

5. What is the output of print(abs(-45.300))

 
 
 
 

6. What is the output of the following code

print(int(2.999))

 
 
 

7. In Python 3, the integer ranges from -2,147,483,648 to +2,147,483,647

 
 

8. Select correct float numbers

 
 

9. What is the output of the following round() function call

print(round(100.2563, 3))
print(round(100.000056, 3))
 
 
 

10. What is the output of the following math function

import math
print(math.ceil(252.4))
print(math.floor(252.4))
 
 
 

11. What is the output of the following number conversion

z = complex(1.25)

 
 

12. What is the type of the following variable

x = -5j

 
 
 
 

Loading ... Loading …

Loading

Filed Under: Python, Python Basics, Python Quizzes

Did you find this page helpful? Let others know about it. Sharing helps me continue to create free Python resources.

TweetF  sharein  shareP  Pin

About Vishal

Founder of PYnative.com I am a Python developer and I love to write articles to help developers. Follow me on Twitter. All the best for your future Python endeavors!

Related Tutorial Topics:

Python Python Basics Python Quizzes

Python Exercises and Quizzes

Free coding exercises and quizzes cover Python basics, data structure, data analytics, and more.

  • 15+ Topic-specific Exercises and Quizzes
  • Each Exercise contains 10 questions
  • Each Quiz contains 12-15 MCQ
Exercises
Quizzes

Posted In

Python Python Basics Python Quizzes
TweetF  sharein  shareP  Pin

  Python Quizzes

  • Python Quizzes Home
  • Basic Quiz For Beginners
  • Variables and Data Types Quiz
  • Operators and Expression Quiz
  • Input and Output Quiz
  • Functions Quiz
  • if else and loops Quiz
  • Numbers Quiz
  • String Quiz
  • List Quiz
  • Set Quiz
  • Dictionary Quiz
  • Tuple Quiz
  • File Handling Quiz
  • Random Data Generation Quiz

All Python Topics

Python Basics Python Exercises Python Quizzes Python File Handling Python OOP Python Date and Time Python Random Python Regex Python Pandas Python Databases Python MySQL Python PostgreSQL Python SQLite Python JSON

About PYnative

PYnative.com is for Python lovers. Here, You can get Tutorials, Exercises, and Quizzes to practice and improve your Python skills.

Explore Python

  • Learn Python
  • Python Basics
  • Python Databases
  • Python Exercises
  • Python Quizzes
  • Online Python Code Editor
  • Python Tricks

Follow Us

To get New Python Tutorials, Exercises, and Quizzes

  • Twitter
  • Facebook
  • Sitemap

Legal Stuff

  • About Us
  • Contact Us

We use cookies to improve your experience. While using PYnative, you agree to have read and accepted our Terms Of Use, Cookie Policy, and Privacy Policy.

Copyright © 2018–2023 pynative.com