Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.

2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

3. Student and Teacher User Guides |  Schemes of Work |   Real Teacher use Videos |


Join 36000+ teachers and students using TTIO.

User Input - Integers

There are three numeric types in Python. Remember 'int' or integer refers to a whole number (with no decimal points)

  • int
  • float
  • complex

Variables of numeric types are created when you assign a value to them:

Example

x = 1    # int
y = 2.8  # float
z = 1j   # complex

To verify the type of any object in Python, use the type() function:

print(type(x))
print(type(y))
print(type(z))

Suggested Video

Teaching/Learning Presentation

www.teachyourselfpython.com