Beginner · PYTHON PROGRAMMINGVariables and built-in types
What you will learn
Bind names to Python objects and inspect common built-in types.
Understand the concept
Python variables do not need type declarations. Names refer to objects, and values determine their runtime types.
Practise
Add a floating-point variable and print its type with type().
[py_tutorial_code]
Experiment with the program below. Your code and input are sent to the selected compiler only when you run it.
Tab indents · Shift+Tab unindents · Esc then Tab leaves the editor · Ctrl/Cmd+Enter runs · Ctrl/Cmd+S saves a draft
Changes save automatically to your account.
Input / output example
Example inputNo input required.
Expected output for the original programAsha 2 True
Output will appear here.
Log in to save your progress