Python Intro
Python Intro
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?
1.Open Schoology
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)
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