Beginning Python Programming
Makzan, 2020 April.
score = 61 if score >= 60: print("Pass") else: print("Fail")
age = input("What is your age? ") if int(age) >= 18: print("You may drink, a little bit.") else: print("Please don't drink.") print("Good bye.")
def is_student_pass(score): if score >= 60: return "Pass" else: return "Fail" print(is_student_pass(59)) print(is_student_pass(62)) # Results: > Fail > Pass
By makzan