
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
10 questions
MULTIPLE ALLELES
Presentation
•
9th Grade
11 questions
Database Relationships
Presentation
•
9th Grade
10 questions
FUNGSI MENU DAN IKON
Presentation
•
9th Grade
10 questions
Adding/Subtracting Integers Intervention
Presentation
•
9th Grade
9 questions
9.3 Solving Systems by Elimination
Presentation
•
8th - 9th Grade
14 questions
Biodiversity Lesson
Presentation
•
9th Grade
8 questions
Check Digit (IGCS)
Presentation
•
9th Grade
10 questions
8.3 - Graphing Square Root Functions
Presentation
•
9th Grade
Popular Resources on Wayground
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
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
Discover more resources for Computers
16 questions
Module 1 Topic 2 Vocabulary Test
Quiz
•
9th - 12th Grade
17 questions
Chapter 1 Review
Quiz
•
9th Grade
20 questions
Google Slides Quiz
Quiz
•
9th Grade
30 questions
Python- if -ifelse-elif
Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
46 questions
Level 1 Google Sheets Midterm Flashcard
Flashcard
•
9th - 12th Grade
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats
Interactive video
•
6th - 10th Grade