Skip to content

Instantly share code, notes, and snippets.

@fatosmorina
Last active October 16, 2021 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fatosmorina/279114171d122d10a7bf7c241fe1c0ff to your computer and use it in GitHub Desktop.
Save fatosmorina/279114171d122d10a7bf7c241fe1c0ff to your computer and use it in GitHub Desktop.
math_exam_points = 51
biology_exam_points = 78
physics_exam_points = 56
history_exam_points = 72
my_conditions = [math_exam_points > 50, biology_exam_points > 50,
physics_exam_points > 50, history_exam_points > 50]
def are_conditions_met(conditions):
if all(conditions):
print("Congratulations! You have successfully passed all of your exams.")
else:
print("It seems that you have to repeat at least one exam.")
return True
print(are_conditions_met(my_conditions)) # True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment