Coding 4-5 B
MP4 Week 5
Getting started with Python
- Go to your software catalog (you may need to restart your computer first)
- Go to PALCS
- Go to Python 3.4.4
- Click install
- 2 Desktop icons will appear on your desktop: Idle & Python
- Click on Idle
- A Python shell window opens! You can now start coding! Just type into the window after the the angle brackets (>>>).
- We'll be coding a program together in Python in chat and running it in Scratch!
Try it! Make Your Computer Say "Hello World!"
- Open IDLE (the shell window opens)
- Click the "file" menu and choose "new file" (this opens the code window)
- In the new blank code window type: print ('Hello World!')
- Make sure you used single quotation marks!
- Save the code: click "file", "save as", name it HelloWorld, and "save."
- Click the "run" menu and select "run module." (this will run the program in the shell window)
- Output: look in the shell window. The "Hello World" message should appear when the program runs! You've just created your first bit of code in Python!
*If a pop-up window appears with a SyntaxError message it often means there is a spelling mistake or typing error in the code.
Flowchart Symbols Used in Programming
What Scratch Blocks Do They Represent?
Send me your Maze Program!
- Send me the URL to your Maze Program in Moodle!
- Make sure your share it so I can view it!
Next Week Goals:
- More with text
- Python and math
- Learn about while loops
- Line of code
print ("Question: What goes clip?\nAnswer: A one legged horse.")
- A sequence of characters that starts with a backslash
\n : new line of text
\t: creates a tab style indent
\\: allows a backslash to appear in a string of text
\": allows a speech mark to be used in a string of text
print ('I say "High", you say "Low". You say "Why?" and I say "I don\'t know". Oh no.')