Curipod placeholder

Python: Print Function and If Else Conditionals

0
0

Curipod lesson about topic "Python: Print Function and If Else Conditionals"

Profile picture of andrey.miguel

andrey.miguel

Updated 5 months ago

1. Word cloud
120 seconds
What is the purpose of the print function in Python?
2. Slide
60 seconds
Print Function: Prints a specified message on the screen. If Else Conditionals: Control the flow of your program by running different code depending on certain conditions. Python is an object-oriented language and uses indentation to structure code.
Python Basics: Print Function and If Else Conditionals
3. Slide
60 seconds
Print Function: A function that prints a specified message on the screen. If Else Conditionals: A control flow structure that runs one block of code if a certain condition is true, and another block of code if the condition is false. Object-Oriented Language: A language designed to allow the creation of objects that contain data and methods.
Concepts:
4. Slide
60 seconds
Python was named after the British comedy series Monty Python's Flying Circus. Python is one of the most popular programming languages in the world. The print() function was added to Python with version 2.6.
Fun facts:
5. Open question
660 seconds
Work together in pairs: How can you use the print function and if else conditionals in your own programming projects?
6. Open question
660 seconds
Work together in pairs: In your own words, explain what is meant by the Python print function and if else conditionals?
7. Drawings
450 seconds
Brain break: Draw a picture of a dragon riding a unicorn through the clouds!
8. Poll
300 seconds
What is the Print Function used for in Python?
  • A. To output text to the console
  • B. To delete text from the console
  • C. To display a graphical user interface
  • D. To store data in the computer memory
9. Poll
300 seconds
Which of the following is an example of an if-else conditional?
  • A. for i in range (0,3):
  • B. if x > y:
  • C. print ('Hello World')
  • D. while x < y:
10. Poll
300 seconds
What is the output of the following code? x = 10; y = 15; if x > y: print ('x is greater than y')
  • A. x is greater than y
  • B. y is greater than x
  • C. x is equal to y
  • D. None of the above
11. Poll
300 seconds
What is the purpose of the else statement in an if-else conditional?
  • A. To execute a set of statements if the condition is false
  • B. To execute a set of statements if the condition is true
  • C. To delete a set of statements
  • D. To store data in the computer memory
12. Poll
300 seconds
What is the output of the following code? x = 5; y = 10; if x > y: print ('x is greater than y') else: print ('x is not greater than y')
  • A. x is greater than y
  • B. y is greater than x
  • C. x is equal to y
  • D. x is not greater than y
13. Drawings
450 seconds
Brain break: Draw a picture of a giant banana dressed up as a cowboy, riding a unicorn!

Suggested content