Blog Detail

September 1, 2023

Python Data Types Exercises

  • What is the characteristic of a decimal number?



  • What is the data type of the exchange_rate variable?

                    exchange_rate = 1.23
  • What is the data type of the latitude and longitude variables?

                    latitude = 37.7749
    longitude = -122.4194
  • What is the output of this code?

                    interest_rate = 0.25
    print(type(interest_rate))
  • What is the data type of the is_vip variable?

                    is_vip = False
  • What is the data type of the is_empty variable?

                    is_empty = True
  • What would be the output of this code?

                    is_registered = True
    print(type(is_registered))
  • Python Exercises for Data Types

    • If you’ve faced difficulties with these exercises, take a look at Data Types Module on my Python course.


    You can also share ‘Python Data Types’ Exercises on your:
    X (Twitter)TelegramLinkedinFacebook – or on your favorite platform…




    Happy Coding!
    Behnam Khani