Saturday, February 27, 2021

Python - If statement eg1

Python: If

print("hello world")
hat = 4
print(hat)

food = 3.456
green = 5
flower = 33

sum = green + food
diffrence = green - food
multiply = green * food
division = green / food

print(sum)

age = 15
if age > 18:
    print("you are allowed to drive")
elif age < 18:
    print("wait a couple more years")
elif age > 14:
    print("go to driving school")
else:
    print("you are not allowed to drive")

No comments:

Post a Comment

Git branch show detached HEAD

  Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03)   00 2. Run re-set hard $ git reset --hard 3. ...