{{tag>projects cloud club computing virtualization machines VMs AWS Azure GCP}}
[[python_club|About the Club]]\\
==== Python Club Topics - Conditional statements ====
==== Conditional statements ====
- Determine 1 of multiple paths or which set of code to run depending on the evaluation of a condition
- if
- if/else
- if/elif/else
==== if example ====
-
a = 100
b = 200
if b > a:
print("b is greater than a")
==== if/else example ====
-
a = 300
b = 200
if b > a:
print("b is greater than a")
else:
print("a is greater than b")
==== if/elif/else example ====
-
a = 200
b = 200
if b > a:
print("b is greater than a")
elif a == b:
print("a and b are both equal")
else:
print("a is greater than b")