Simple Data Types

Data Types

Python Simple Data Types

Python stores different types of information in different data types.


These are used to store mixed text, passwords, sentences.


  • dog
  • passw54£$%^123
  • The cat sat on the mat


These are used to store whole numbers.


  • 435
  • -323442


These are used to store numbers with a decimal place values.

  • 4.13234
  • 0.00000000023


These are used to store True or False values


  • True
  • False

Video 1

Click in the top right of the video to view full screen

Basic Example

Video 2(Advanced)

Challenge 9

Challenge 9 – How’s the temperature?

YouTube blocked at school? Try the Google Drive version 


  • Ask the user the temperature and convert the temperature to an integer.
  • If the temperature is above 30 degrees, tell the user it is hot today


  • If the temperature is below 5 degrees, tell the user the it is cold.
  • Use the os.system(‘clear’) function to add system clears to your program.


  • If the user enters any amount outside of the valid range ( – 50c ./ + 50c) , they should be told that they have entered an invalid value.


Challenge 10 – Calculate the area of a rectangle.

YouTube blocked at school? Try the Google Drive version instead


  • Ask the user to enter the length and width of a rectangle.
  • Convert the inputs to integers.
  • Output the area of the rectangle.


  • Use the .strip() method to remove spaces before and after the user’s input.
  • Also calculate the perimeter of the rectangle and output the perimeter as well.


  • Ask the user to enter the lengths and widths of 2 rectangles.
  • Calculate the area of both and output which rectangle is higher.


Challenge 11 – Calculate the missing triangle angle

The angles of a triangle always add up to 180 degrees.

YouTube blocked at school? Try the Google Drive version


  • Ask the user to enter 2 angles of a triangle and convert the values to integers
  • Work out the third angle and output it to the user.


Check each of the values entered to ensure that they are valid ( less than 180 degrees in total) and print out an appropriate response if they don’t enter a valid amount.


  • Check the values entered and calculated to work out of the triangle if the triangle is either:
    • Equilateral  – All angles equal size.
    • Isosceles – Two angles equal size.
    • Scalene – All angles of different size.
  • Print out an appropriate amount.


Challenge 12 – Reaction Timer Game

Create a program that tests the user’s reaction time.

*** To complete this challenge you need to watch the advanced tutorial ***

YouTube blocked at school? Try the Google Drive version



  • Get the program to wait a random amount of seconds  and then ask the user to press enter.


  • Record the time the message was displayed and the time the user pressed enter. Work out the response time and print it out to the user.
  • use the round() function to convert the user’s float to 2 decimal places.


  • If the user took less the 0.1 seconds, tell them well done.
  • If the user took longer than 0.5 seconds, tell them their reaction time is too slow.