Which four data types are used in Python? Can you give an example of each?

In Python we use Strings, Integers, Floats and Booleans.String - text e.g. "Hello World"Integer - whole number e.g. 5Float - decimal number e.g. 2.8Boolean - binary value e.g. True, False

Answered by Emilia S. Python tutor

1313 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

Write a recursive function to return the nth Fibonacci number in Python


Explain the difference between local and global variables


How would you write a while loop to print all even numbers from 1-10?


Define a function that takes in the age of the user and adds it to an output sentence such as "You are ..... old".


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo
Cookie Preferences