
Procedural Programming: 01 Python Basics
Presentation
•
Computers
•
University
•
Practice Problem
•
Medium
Karen Ahmed
Used 23+ times
FREE Resource
12 Slides • 9 Questions
1
Procedural Programming: Lesson 1 Part 2
Python Basics
2
Statements & Expressions
Python is an interpreted high-level programming language.
A complete computer command is called a statement.
For example: print("Hello World")
An expression evaluates to a new value.
For example: 2*2
3
Multiple Choice
What is a statement?
A section of an algorithm
A translation of machine code
A precise description of a problem
A complete computer command
4
Multiple Choice
Which function outputs text to the terminal?
output()
print()
write()
type()
5
Variables
We can store values in variables.
To do this we use the assignment operator =
For example: answer = 2*2
Variables store values not expressions
Good variable names describe the data they contain
6
Multiple Choice
How do we assign the number 10 to a variable?
new variable_name = 10
variable_name == 10
def variable_name = 10
variable_name = 10
7
Multiple Choice
What is the output of this code?
cool_number
210
42
8
Data Types
All variables have a data type
ints are whole numbers
floats are decimal numbers
strings are text
Variables can be of any data type
In Python, we don't need to declare variables, we can just use them by assigning a value
For example:
9
Multiple Choice
Which of these variables is a string?
cool_variable_1
cool_variable_2
cool_variable_3
cool_variable_4
10
Multiple Choice
What is the difference between a float and an int?
A float is text, int is a number
A float is decimal, int is a whole number
A float is a whole number an int is decimal
11
Strings
We can define strings on multiple lines
We can combine string values to make a new string.
Strings are combined using the + operator.
This is called string concatenation.
Strings are concatenated without spaces.
12
Multiple Choice
How do we define a multi-line string?
###
Like this
###
***
Like this
***
"""
Like this
"""
13
Multiple Choice
How do you combine two strings?
string1 + string2
string1.combine(string2)
string1.concatenate(string2)
14
Comments
We use comments to explain our code.
Comments are ignored by programming languages.
A comment in Python begins with the # character
For example: #this is a comment
15
Multiple Choice
What character begins a comment in Python?
%
*
#
/
16

ascii-art - Replit
You can open this webpage in a new tab.
17
Lovely Loveseat Project
18

LovelyLoveseats - Replit
You can open this webpage in a new tab.
19
User Input
We can also use variables to store user input.
We use input() to assign a user value to a variable.
This requires a prompt message for the user.
This is printed before they can enter data.
For example:
20
Working with Strings & Ints
Python always accepts user input as a string.
So we cannot perform calculations with it.
We need to convert the input string to an int using the int() function
For example:
21

TheCalculator - Replit
You can open this webpage in a new tab.
Procedural Programming: Lesson 1 Part 2
Python Basics
Show answer
Auto Play
Slide 1 / 21
SLIDE
Similar Resources on Wayground
18 questions
Reported Speech
Presentation
•
University
16 questions
Tecnologías emergentes en la educación
Presentation
•
University
18 questions
TIPOS DE TEXTO
Presentation
•
University
16 questions
¿Cómo vamos?
Presentation
•
University
17 questions
Genetics Review Part 2 (Practice)
Presentation
•
6th - 9th Grade
18 questions
Perfect Verb Tenses
Presentation
•
KG
18 questions
Budgeting Strategies
Presentation
•
University
14 questions
PRESENT SIMPLE
Presentation
•
University
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade