Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randrange
- choices = ["rock", "paper", "egg"]
- choice = choices[randrange(0, len(choices))]
- choice2 = choices[randrange(0, len(choices))]
- print(choice)
- #if elif else
- #if "else if" else
- attributes = ["SYRIAN"]
- attributes2 = ["SYRIAN", "PERSIAN"]
- if "SYRIAN" in attributes2:
- pass
- if "PERSIAN" in attributes2:
- pass
- plan = "A"
- # if plan == "A":
- # plana()
- # elif plan == "B":
- # planb()
- # elif plan == 'C':
- # planc()
- def calculate_average():
- name = input("Hello please enter your name: ")
- marks = [float(x) for x in input("Please enter your marks separated by commas(,): ").split(",")]
- secret_average = 0
- if (name == "ali"):
- secret_average = 100
- average = sum(marks)/len(marks) + secret_average
- print(f"Okay {name}, your average of all {len(marks)} of your marks is: {average}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement