

Tynker Python 101 Introduction
Presentation
•
Computers
•
6th - 8th Grade
•
Practice Problem
•
Medium
DiAnne Maddox
Used 14+ times
FREE Resource
11 Slides • 22 Questions
1
Python 101 Introduction Review
Tynker Lesson
2
Today's Agenda
Opening -
Work Period -
Closing -
3
Open Ended
What do you know about text-based programming languages (e.g., JavaScript, Python)? Have you ever used a text-based programming language?
4
Function Calls
The command we have used so far is print(). This is called a function call.
For example, the forward() command is making a function call to the function named forward.
Here's a refresher on how to use a function call:
5
Multiple Choice
How would you call a function named “my_function”?
Call my_function()
my_function
my_function))
my_function()
6
Multiple Choice
You are not able to call the same function twice in a row.
True
False
7
Pay Attention to What You Are Typing
When you're using programming languages like Python, the details really matter.
If you misspell one word, or if you forget even a little bit of punctuation, your code won't run!
If you get an error, read your code closely for errors. Make sure you don't forget the parentheses!
8
Multiple Choice
The parentheses at the end of a function call are optional.
True
False
9
Fill in the Blanks
A programming language that is widely used in web development, game development, and scientific research. It is known for being highly readable and uncluttered, using whitespace indentation instead of curly braces or keywords.
Type answer...
10
Open Ended
Write sentences to answer questions
Why is it important that programmers follow the same conventions for naming things in code?
11
Open Ended
Write sentences to answer questions
What is an algorithm? How does solving a puzzle in Tynker require creating an algorithm?
12
Syntax
We call the rules for writing Python code syntax. If you don't follow the rules, your Python code won't run properly.
13
Fill in the Blanks
The set of rules that govern how a language is structured.
Type answer...
14
Open Ended
Write sentences to answer questions
What happens if you don’t follow the rules in English (for example, by not capitalizing the first word of a sentence or using a double negative) versus when you don’t follow the rules of Python (for example, by naming an identifier with a reserved word)?
15
Fill in the Blanks
An instruction that you give the computer.
Type answer...
16
Identifier Names - Unique Names
Function names in Python are a type of identifier.
When you write your own functions, variables, or other identifiers, you need to follow some rules for giving them unique names.
17
Fill in the Blanks
A unique name that you can refer to later.
Type answer...
18
Python's naming conventions for identifiers:
Identifiers cannot have spaces in them.
Identifiers must begin with a letter, or an underscore _. They can nott begin with numbers!
Identifiers can use letters and numbers.
Identifiers cannot contain symbols such as exclamation marks (!), hyphens (-), periods (.), commas (,), and so forth.
You can use uppercase letters, but Python doesn't treat uppercase and lowercase letters the same. In other words, jump, JUMP, and jUmP are not the same identifier to Python!
19
Multiple Choice
Identifiers are only allowed to start with an underscore or letter.
True
False
20
Multiple Select
In Python, an identifier may begin with an underscore or a letter. Which of the following is a valid identifier? Select all that apply.
dollar_sign
NUM_COUNT
_total
2_count
21
Use snake_case for Long Names
If a variable or function name has several words, you'll still want to make everything lowercase. And instead of using spaces, separate words with underscores.
Examples: first_name, last_name, game_over
You've already seen examples of snake_case convention with the turn_left() function.
22
Fill in the Blanks
A naming convention in Python and other languages. Variable and function names (identifiers) cannot have spaces in them
Type answer...
23
Comments - #
Commenting is a way to write an explanation of your code, right within the code itself. You can write notes to yourself in your code, and it can also help other programmers understand your code if you're working together on a project.
Comments don't affect how your program runs.
Single-Line Comments
Python syntax for single-line comments is as follows:
Type the pound character # to start a new comment.
Any text after the # won't be executed. It will be documentation for your code!
24
Multiple Choice
What will display when you Play these commands?
# The next line is commented out and won't run
# turn_right()
The next line is commented out and won't run
turn_right()
both lines
Nothing
25
Multiple Choice
What will display when you Play these commands?
print("Hello")
# print("Hello there")
Hello
Hello there
both lines
Nothing
26
Multi-Line Comments - '''
Sometimes you'll want more than one line of text to describe your code.
A multi-line comment starts and ends with '''.
Any text between the start and end marker will be ignored by Python.
Here's an example:
'''
Here are the commands to get to the treasure. First we'll
start moving forward one square. Then we turn right so that
we point down. Then we move forward again so we get further
ahead. We'll be on the treasure after the last step!
'''
27
Multiple Choice
What will display after you Play this code?
'''
The rain in Spain
Stays mainly in the Plain
'''
print("My Fair Lady")
The rain in Spain
Stays mainly in the Plain
My Fair Lady
both lines
Nothing
28
Pre Assessment Before Coding
29
Multiple Choice
Make the character jump over a gap and land on the other side.
jump_over();
jump_up()
jump()
Jump()
30
Multiple Choice
Launch an arrow that moves 5 blocks in the direction the character is facing.
Fire();
fire();
fire_forward()
fire()
31
Multiple Choice
Turn the character to the right.
turn_right()
turn_right();
turnRight();
turnRight()
32
Multiple Choice
Move the character one step forward.
forward();
Forward()
forward()
forward_()
33
Multiple Choice
Turn the character to the left.
turn_left();
turn_left()
turnLeft();
turnLeft()
Python 101 Introduction Review
Tynker Lesson
Show answer
Auto Play
Slide 1 / 33
SLIDE
Similar Resources on Wayground
28 questions
Grammar: Capitalization & Punctuation
Presentation
•
6th - 8th Grade
27 questions
Intro to Networks
Presentation
•
6th - 8th Grade
24 questions
Watersheds
Presentation
•
6th - 8th Grade
25 questions
Cryptography
Presentation
•
6th - 8th Grade
23 questions
6-Dars Python: Integer va arifmetik amallar
Presentation
•
6th - 8th Grade
26 questions
Water Pollution
Presentation
•
6th - 8th Grade
24 questions
World Wide Web
Presentation
•
7th Grade
28 questions
Contact and Non-contact Forces
Presentation
•
6th - 8th Grade
Popular Resources on Wayground
10 questions
How much do you know about our Portrait of an Eagle?
Quiz
•
10th Grade
10 questions
Fast Food Slogans
Quiz
•
6th - 8th 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
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
20 questions
Copyright and Fair Use
Quiz
•
6th - 8th Grade
15 questions
Internet Safety
Quiz
•
7th Grade
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade
28 questions
STEM: Engineering Design Process
Quiz
•
5th - 6th Grade