Variables, Expressions Statements and Conditional Satatements
Variables, Expressions Statements and Conditional Satatements
Statements and
conditional Satatements
Values and types
Value: A value is one of the basic things a program works
with, like a letter or a number. For example: The
values are 1, 2, and “Hello, World!”
Types: These values belong to different types: 2 is an
integer, and “Hello, World!” is a string.
1. Integer : Int
2. String : Str (make sure that it is in
quotes, works for both single or double
quotes)
3. Float : float
If you are not sure what type a value has, the interpreter can tell you
Variables
Variable: A variable is a name that refers to a value.
An assignment statement creates new variables and gives them values: