
Intro Python Y9
Presentation
•
Computers
•
9th Grade
•
Medium
Shaw Williams
Used 4+ times
FREE Resource
9 Slides • 6 Questions
1
Mr. Williams
2
The following are examples of ACCEPTABLE variable names:
apples, car, costs
b8, a12, z1000
The following are example of NOT ACCEPTABLE variable names:
1, 100, 3000, 22, 14 (a variable can not start with a number)
print, input, def (these are keywords used within python)
3
Part of a program that can be assigned a specific value
Made up of two parts; an identifier, and a value.
This value CAN change while the program is running.
4
Part of a program that can be assigned a specific value
Made up of two parts; an identifier and a value.
This value can NOT change while the program is running.
5
Multiple Choice
What is the name of the 'Variable' in this example Python code
name
input
("What is your name")
6
It's important to comment your code often.
When commenting code, use the symbol # followed by your comment
7
Multiple Select
Why is it important that we use comments in our code?
They help the program run smoothly
So that we understand what the line of code does
To help other programmers understand our code
To fill our code with colours
8
Variable names are limited to certain characters when they are defined in your code. Using incorrect Variable names will result in your code displaying the error:
"Syntax Error: invalid syntax"
9
Multiple Select
Which of the following are acceptable Variable names
horse
x
3
x4
10
All data in Python is represented by 'objects' or the relationship between 'objects'.
Every object has three things:
An 'identity'
A 'type'
A 'Value'
An objects 'identity' never changes once it has been created - it is forever saved in the Python's memory.
11
An object's type determines what operations that it supports, for example:
Does it have a length? which then defines the possible values for objects of that type.
The type() function returns an object's type (which is an object itself)
Just like an object's 'identity', an object's type is also unchangeable.
The values of some objects can change though...
12
Multiple Choice
Objects who value is unchangeable once they are created are called...
Immutable
Mutable
Defined
Undefined
13
Multiple Choice
When this Python code is run what will it display?
<class = 'int'>
<class = 'float'>
<class = 'int'>
<class = 'float'>
9
9.0
14
There are several built-in functions that let you convert one data type into another. These functions return a new object representing the converted value, such as:
int(x) which converts x into an integer
float(x) which converts x into a floating-point number
str(x) which converts x into a string representation
15
Multiple Choice
What would you type to covert the float number to an integer?
print(type(float_number)
print(float_number)
print(int(float_number)
print(number)
Mr. Williams
Show answer
Auto Play
Slide 1 / 15
SLIDE
Similar Resources on Wayground
13 questions
การพัฒนาแอปพลิเคชัน
Presentation
•
9th Grade
13 questions
MS Publisher
Presentation
•
9th - 10th Grade
9 questions
6.2 -- Key Features of Quadratic Functions
Presentation
•
9th Grade
9 questions
حاسوب
Presentation
•
8th - 9th Grade
12 questions
Web Development
Presentation
•
8th Grade
12 questions
Графічний інтерфейс користувача на мові Python
Presentation
•
9th Grade
11 questions
Solving Equations with Variables on Both Sides
Presentation
•
8th - 9th Grade
13 questions
Electoral Politics
Presentation
•
9th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade