Skip to content

Instantly share code, notes, and snippets.

@damwhit
Last active February 12, 2021 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save damwhit/99e906bcfb3b39d34790e2a246029716 to your computer and use it in GitHub Desktop.
Save damwhit/99e906bcfb3b39d34790e2a246029716 to your computer and use it in GitHub Desktop.
# Assign a variable called pizza a value of ‘the best food of all time’
pizza = "the best food of all time"
# Assign a variable called isHungry a value of true
isHungry = true
# Assign a variable called number a value of 5
number = 5
# Reassign that number variable so that is has a value of 4
number = 4
# Assign a variable called teachers a value of an array with the names ‘Ellen’, ‘Robert’, and ‘David’
teachers = ["Ellen", "Robert", "David"]
# Try the following (these may take some googling):
# Create another string variable and add combine it with your pizza variable
new_string = "ya ya ya"
combined_string = newString + pizza
# Create another integer variable and multiply it by your number variable
num2 = 77
product = num2 * number
# Remove the last item from your teachers array
teachers.pop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment