repl.it
@Zeune/

Python testing

Python

Used to test python code

fork
loading
Files
  • main.py
main.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
## Variables
## Integers
year = 2019
age = 21
birthYear = year - age

## Strings
name = "Tsion"

print("Hello", name, "it's", year) 
print(name, "is cool")
print (name, "Tsion is a good worker")
print (name, "is going home in an hour.")

print (name, "was born in",birthYear)

if age > 21:
  print (name, "is legal to attened the bar... they are", age)
  
elif age < 21:
  print (name,"is NOT  allowed to go bar... they are",age)

else: 
  print (name,"is NOT allowed to attened the bar....they are",age)

  ## Learning how to loop
  x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,11, 12, 13, 14, 15]

  for y in x:
    print(x)
Fetching token
?