Title
grade1 = 90
grade2 = 65
grade3 = 60
grade4 = 75
grade5 = 95
print("1 > 2 or 5 < 12:", 1 > 2 or 5 < 12)
# Output TRUE using OR ^
# Output FALSE using NOT
print("24 > 8:", 24 > 8 not 24 > 8)
# Output FALSE using AND
print("10 > 20:", 10 > 20 and 10 > 20)
num1 = 50
num2 = 150
sum = num1 + num2
print(sum)
Write a program that fits these conditions using nested conditionals: If a person has at least 8 hours, they are experienced If a person is experienced their salary is 90k, if they have ten hours or above their salary 150k If a person is inexperienced their salary is always 50k print the salary of the person at the end and whether they are experienced or not
import random
salary = 0
ran = 0
total = 0
av = 0
def pleb():
global ran
global salary
xp = random.randrange(11)
if xp >= 8 and xp < 10:
salary = 90
elif xp >= 10:
salary = 150
else:
salary = 50
ran = ran + 1
runs = 100000
while ran < runs:
total = total + salary
pleb()
av = total / runs
print(av)