CHEAT SHEET 5

 


Cheatsheet (Functions and Conditionals)

In this section, you learned to:

  • Define a function:

  • Write a conditional block:

  • Write a conditional block of multiple conditions:

  • Use the and operator to check if both conditions are True at the same time:

Output is Yes since both x and y are 1.

  • Use the or operator to check if at least one condition is True:

Output is Yes since x is 1.

  • Check if a value is of a particular type with:

or


PYTHON PROGRAM SYNTAX SERIES

Comments

Popular Posts