Module 2 Assignment 2 features designing the logic for a simple program using pseudocode and then writing the program in Python.
Each lab asks you to write pseudocode that plans the program’s logic before you write the program in Python and to turn in three things: 1) the pseudocode, 2) a screenshot of the IDLE console’s results, and 3) the Python program.
Pseudocode and Python Program Design Requirements
Design the pseudocode and a Python program that asks customers for their name, where they want to go, how long they plan to stay, and calculate how much it will cost by multiplying the days by $100 per day. Confirm the information that the user provided.
- In a welcome message, tell the customer that she/he won a free vacation with airfare and hotel expenses paid.
- Ask for the customer’s name.
- Ask the user “where do you want to go for vacation? Display the location on screen.
- How many days will he or she spend on vacation, 4 or 7 days?
- Calculate the cost by multiplying the number of days by 100.
- Display the total expenses for food and entertainment.
Module 2 Assignment 2: Post Your Pseudocode & Python Program:
- Write your pseudocode using English-like program statements. Save it as a Word .docx file or .rtf file.
- Create a New File in IDLE and Save the file with your initials. [example for someone with the initials cc: M2Lab2cc.py]
- At the top of your program, add a comment using the # sign, add your name and the assignment M2Lab2.
- Write your program following the steps in the Instructions.
- Save your new Python program, run it and test it.
- Tip: If you see the # of days repeat 100 times, you are multiplying a string. Look up how to input an integer for the # of days.
- Take a screenshot of your program output in the Python console window [Alt Key + PrntScreen].
- Right click and Paste the screenshot into the same Word document with your pseudocode.
- Upload to M2 Assignment 2 Pseudocode & Python Assignment Submission Folder.
- Output screenshot with your pseudocode
- Python program
See the Schedule in the Syllabus Module for due dates. Review the Rubric attached to the Assignment Submission Folder for grading information.
few seconds ago