0% found this document useful (0 votes)
8 views

Python Intro

This is a PowerPoint I developed to teach Python coding to middle school students
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Python Intro

This is a PowerPoint I developed to teach Python coding to middle school students
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

What is

Coding?
Today you will learn:
• What coding is
What it is used for
Why you should learn
to code
How to begin to code in
Python, a coding
language
What is coding?

Coding tells a computer what to do


It creates instructions in a language
the computer understands
It allows you to "talk" to the
computer to solve a problem!
What kind of problems have you
solved so far in this class?
o Designed your Snow Globe and
Name Key Chain in Tinkercad
o Created your board or card game
o Made your LEGO digital accessory
Why should I learn to code?
The world runs on code!
What are some examples of
things that use code?
• Apps on Smartphones
• ATMs
• Online shopping sites
• Games and movies
Let's learn more about coding!

 Write down important ideas as you watch the


following video:
 The Power of Code: How Programming Shapes o
ur World | Neal Chopra | TEDxSacredHeartSchool
sAtherton
to 3:18
Let's think about what we saw:
1. What does the speaker mean when he says
"...everything in this room was created by someone
punching zeros and ones into a computer?"
2. While code may be invisible to us, what does it have
the power to do?
3. What are the differences between the first computer
invented in the 1950s and those of today?
4. What does he mean when he says that the first
computer language was "kind of like Latin?"
Why should I
learn Python?

Let's read the article


"What Is Python Used
For? A Beginner's
Guide," Take a few
notes on things you
think are important.
Let's answer some questions from
the article!
1. What is Python and what is it used for?
2. What are some everyday tasks for
which you could use Python?
3. Why is Python so popular?
Now let's do some coding!
 We will use the Python 3 coding
language on this website

1.Open Schoology

2. Go to the "Coding Materials and


Assignments" folder

3. Click on the link at the top inside


the folder once you have opened it.
Here is an
example of a
chatbot you will
learn to create
 https://computerscie
nced.co.uk/site/onlin
e-python-ide/
Now it's your turn!
 Enter the following code into the CODE
box on the Python Online website:
 print(‘Hello world!’)

 Now click the “RUN” button


 The words Hello world! Should appear
in the OUTPUT window.
Python text strings can be added
together! Try this:

name=‘Zoe ’
message=‘likes to code’
print(name+message)
Let’s take this string to the next
step!
Let’s enter the following into the
CODE section of the Python
website:
name=input(‘What is your
name?’)
Using Python as a calculator!
Try entering these in CODE!
 NOTE: if you enter #and words, it is a way to remember what you
enter
 350+427 #addition
 987-120 #subtraction
 34*45 #multiplication
 57/2 #division
 57//2 #floor division – it discards the fractional part
 57%2 #returns remainder from the division
 3**2 #3 raised to the power of 2
 Round(100/3, 2) #round the result to 2 decimal places
 (100-5*3)/5 #order of operations
Here are the answers!
You can store variable numbers in
memory and then use them in
math!
 Enter these into the CODE box:

 width=100

 height=20

 area=width*height

 print(area)

 Enter the following into the CODE box:


 distance=102.52

 speed=20

 time=distance/speed

 print(time)
Your Assignment:
 Read pp. 8 through 30 in the
Creative Coding in Python
book located in the folder of
the same name in Schoology.
 Then go to page 26
 Follow Steps 1 through 6 to
create your chat bot.
 Click the RUN button
 Name your file as follows:
last name.py.
 Click “Save”
 Then upload your file to
Assignment 1 in Schoology.
 This PowerPoint is in the
Creative Coding in Python file
in Schoology

You might also like