How do we control robots? How are python programs created?
The purpose of this lesson is to learn how to make Scribbler move using Myro and Python programming commands. Also we will learn about these programming concepts: parameters, modules, functions, and saving programs.
Objectives/Outcomes:
By the time you complete this activity you should be able to:
1. Understand the structure of programs and create a new program and run it
2.
Teach Scribbler how to speak
3.
Use repetition in a program with loops
4. Use commands to estimate in a program
5. Obtain input for a program and display information
6. Use a formula to convert temperature from Celsius to Fahrenheit and Fahrenheit to Celsius
7. Add loops to your dance program
8. Use a list of values in a program
9. Create and use functions in a program with variables
10. Use math functions to perform calculations –
multiply, divide, add, subtract
11. Use these Myro and Python commands:
a. speak(<something>,
0)
b. timer(<seconds>)
c.
Values
and Names in Python
d. eval(ask(<prompt
string>))
e.
print(<expression1>,
<expression2>, ...)
f.
<variable
name> = <expression>
g.
range(n1,
n2)
h. range(n1, n2, step)
i.
for
<variable> in <sequence>:
j.
while
True:
Instructions:
View the following items and open the Worksheet document. The worksheet contains a checklist for you to check off items as you complete them, and also has questions to answer. Follow the instructions and guidelines provided by your instructor and give the filled-out worksheet to your instructor at the completion of this activity.
Resource |
Name and Link to Resource |
Est. Time |
Chapter Overview Video |
2 min |
|
Activity Worksheet |
|
|
Textbook |
|
|
Activity Video(s) |
Chap 3 Activity 1 a Robot Brain Chap 3 Activity 2 What’s in a Name? Chap 3 Activity 3 A Calculating Program Chap 3 Activity 4 Using Input Chap 3 Activity 5 Repetition in Python Chap 3 Activity 6 While Loops Chap 3 Activity 7 World Population |
2 min 7 min 10 min 5 min 8 min 7 min 2 min 7 min 6 min |
Programs |
|
|
Additional Resources |
The Semicolon Wars www.americanscientist.org/issues/pub/the-semicolon-wars
|
|
|
|
|
|
|
|
|
|
|
|
|
|