
Python OOP Lesson 1 Part 2
Presentation
•
Computers
•
University
•
Hard
Karen Ahmed
Used 14+ times
FREE Resource
4 Slides • 5 Questions
1
Object-Oriented Programming Lesson 1
Procedural Python
2
Python Basics
print() outputs text to the screen.
input() accepts user input.
Variables need to be assigned a value before they can be used.
Selection is made using if-else or if-elif-else statement blocks.
Python uses indentation for selection, iteration and functions.
Functions are defined with the keyword def.
Strings need to be surrounded with quotes
3

QuickCalculator2 - Replit
You can open this webpage in a new tab.
4
Multiple Choice
Which function outputs text to the terminal?
output()
write()
print()
type()
5
Multiple Choice
What is the Python syntax for creating a variable and assigning the number 10 to it?
variable_name == 10
variable_name = 10
def variable_name = 10
new variable_name = 10
6
Multiple Choice
What is the output of this code?
cool_number
210
42
7
Multiple Choice
Which character is used for a comment in Python?
#
*
"
/
8
Multiple Choice
What happens if we run this code in Python?
"message" is printed
"What a cool message!" is printed
Python throws a syntax error
9

GuessTheNumberGame - Replit
You can open this webpage in a new tab.
Object-Oriented Programming Lesson 1
Procedural Python
Show answer
Auto Play
Slide 1 / 9
SLIDE
Similar Resources on Wayground
4 questions
ວິທີການສ້າງ Java Class
Presentation
•
University
10 questions
Pengenalan ROS
Presentation
•
University
6 questions
Elements of Language
Presentation
•
University
7 questions
Christmas quiz
Presentation
•
University
6 questions
Web Technologies
Presentation
•
University
6 questions
Week 3 CAD 154
Presentation
•
University
7 questions
Python
Presentation
•
University
7 questions
Python Basics
Presentation
•
12th Grade
Popular Resources on Wayground
24 questions
PBIS-HGMS Day 10
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Review 3
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
15 questions
HCS SCI 05 Summer School Assessment 3 Review
Quiz
•
5th Grade
35 questions
Lufkin Road Middle School Student Handbook & Policies Assessment
Quiz
•
7th Grade
18 questions
Geo 11.3 Area of Circles and Sectors
Quiz
•
9th - 11th Grade