My name is Diego and I am a CS Masters student, my hobbies include:
This lab is mostly to get you all comfortable with the Thonny text editor / IDE
let's throw the following into Thonny, and walk through it!
name = input("What is your name?")
name_length = len(name)
print("Hello", name)
print("You have", name_length, "characters in your name.")
let's run our code by pressing the green "play button" in the top left
check that out! just like we anticipated! our program asks us for our name and then returns the length!
Now that we know how our program should run, lets intentionally break it so we can learn how to fix it
name = input("What is your name?")
name_length = len(name)
print("Hello", name)
print("You have", name_length, "characters in your name.")
Now that we know how our program should run, lets intentionally break it so we can learn how to fix it
let's run our code again by pressing the green "play button" in the top left
it seems like python didn't recognize what we were trying to do...
maybe it's because python is case sensitive 🤔
change some other stuff and see what happens!
see what fun new errors you can discover!
Turn to the person to your left (or right if that makes sense) and ask the following questions!