-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.py
39 lines (32 loc) · 846 Bytes
/
variables.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Here is example of variables in python
# The x has text and it is called string in python
x = "String"
# The y has integer which is number
y = 2
# You can set variables in one line like that
z, d, var = "First", "Second", "Variable!"
# Lets test!
print(z, d, var)
# And also you can set variables all in one
first = second = third = "A-I-O!"
# Lets test that!
print(first, second, third)
# You can do mathematical actions on variables too!
math1plus1 = 1+1
print(math1plus1)
# output: 2
# It all works!
# You can set bool for variables bool is like true or false!
itstrue = True
itsfalse = False
print(itstrue, itsfalse)
# output: True False
# Remember to these variables are commented because they are invalid!
"""
my Variable
4myVariable
myVariable!
"""
# No special characters allowed!
# No spaces!
# No variable starting with number!