I will be adding problems over the next few days. I want the class to start working on little bits of code in scratch that will be related to the 3 door game we are going to code.
Feel free to email me with questions and I can probably get back to you by the following morning if not sooner.
Problem 1: In Scratch, make a list with elements A,B,C . Then imagine that a player picked door A and the prize was behind door B. So which door gets opened? Now remove “A” from the list and remove “B” from the list. Whats left?
Problem 2. In Scratch make a list with elements A,B,C . Then imagine that a player picked door A and the prize was behind door A. Now which door should be opened? Is there a choice? So remove element “A'” from the list. What do you think is the next line of code?
I made a post about using an online interpreter for python. Its pretty simple and will allow everyone to run code without dealing with installing etc. So once you get code to work save your code in another file, email or just write down on piece of paper.
Go to link http://www.compileonline.com/execute_python_online.php
In the upper right hand corner is an arrow labeled execute script. Click on this arrow. Do you see where it printed out “Hello World”
Congratulations, You just ran your first python script!!!!!!! (If there were a fancy Nancy book on coding in Python, Nancy would explain that a script is just a fancy word for a a program or bit of code that you write in python)
Problem 2: Type in the code below
x = 2
if ( x > 9):
Then run the script. What happened?
Now change the first line to:
Run the script. What happened?
Can you explain what is going on?