variables
Variables can hold numbers that you can use one or more times.
Numbers can be of one of these datatypes:
- integer (1,2,3,4)
- float (numbers behind the dot)
- boolean (True or False)
Numeric variables example
Example of numeric variables:
You can output them to the screen using the print() function.
Python supports arithmetic operations like addition (+), multiplication (*), division (/) and subtractions (-).
User input
Python 3
Use the input() function to get text input, convert to a number using int() or float().
Use the input() function to get text input, convert to a number using int() or float().
Comments
Post a Comment