2nd Semester Intro to Computer Science

Lab 1.04 - Magic Genie

Project Objective

  • Use Python to interact with variables and user input
  • Create a genie program. Save the file as magic_genie.py.

Project Specifications

  • Have the program introduce itself
  • Have the program ask for three separate wishes
  • Print all the wishes togethe

magic_genie_output

  • There are some repeated strings in this genie program. Move those into variables

Genie Confusion

Now it’s time to make your genie confused. Edit your code to have him print your first wish as your last wish, and your second wish as your first wish, and your third wish as your second wish.

magic_genie_output_confused

SNAP Flashback – Magic Genie

Genie Code - Snap

Hint

Remember to add spaces you can combine " " to the end of your string using the + operator. So print("hello" + " " + "student") would print hello student

Edit this page Report an issue