0% found this document useful (0 votes)
46 views5 pages

Jacob Sarmiento's Computational Project

The document provides instructions for a Module Two Project involving writing a Python program that utilizes computational thinking steps. Students are asked to write pseudocode and Python code for a program that recommends a vacation outfit based on weather, color preference, and gender, or a program of their own design that is shopping related. The pseudocode and code must include specific elements like user input, conditionals, repetition, and output. A post mortem review is also required to assess the program.

Uploaded by

Lord dunkin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views5 pages

Jacob Sarmiento's Computational Project

The document provides instructions for a Module Two Project involving writing a Python program that utilizes computational thinking steps. Students are asked to write pseudocode and Python code for a program that recommends a vacation outfit based on weather, color preference, and gender, or a program of their own design that is shopping related. The pseudocode and code must include specific elements like user input, conditionals, repetition, and output. A post mortem review is also required to assess the program.

Uploaded by

Lord dunkin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

02.

06 Module Two Project

Name: Jacob Sarmiento

Directions

Now that you understand how to retrieve input from the user, assign variables, and use if statements,
it's time to show your instructor and yourself how to put it all together! Your program can include any
Python skills and functions you have learned up to this point.

You will follow the four steps in computational thinking to develop and design this program.

Step One: Decomposition


Decomposition involves identifying a problem and breaking it down into smaller, more manageable
steps.
Example: A salesperson at a clothing store identifies that their customers have trouble deciding what
clothing they want to purchase when going on vacation. This salesperson also observes that many
customers feel pressured when a salesperson tries to help. Hmmm, sounds like a job for a programmer!

Step Two: Pattern Recognition


After the problem has been broken down in the decomposition step, additional data is needed.

Example: The clothing store polls its customers about shopping preferences and uses the data to look
for patterns. They realize that customers have a hard time deciding on clothes for a vacation because
they don’t know how to dress for weather.

Step Three: Algorithmic Design


Here's where the fun (and the assignment) really begins. Choose one of the options provided below:

Option 1: Vacation Attire

You've been hired to create a computer program to help the clothing store’s customers select
and purchase an outfit for their vacations. The program will recommend an outfit based on the
temperature of each customer’s vacation destination, favorite color, and gender.

Option 2: Choose Your Own Adventure

Do you enjoy being creative and making up your own scenarios? If you do, then this option is for
you! Come up with any scenario for this assignment as long as you do the following:

• Make it shopping related (this includes delivery, sales, accounting, or anything else that
works directly with retailers).
• Ensure people reading your code understand your scenario (Hint: Use lots of comments
in your code).
• Follow the requirements described below.

Pseudocode

Write your pseudocode where indicated below. Your pseudocode should be written in English (not
Python), should indicate a program that is improving the retail industry, and must:

be written in a series of steps that reflect algorithmic design


print a description of your online store for the user to read
obtain user input in order to make a recommendation
o ask the user for at least three values
o show proper use of the int(), float(), and/or str() functions.
demonstrate proper use of repetitive statements
o include at least one nested if-else/elif statement
demonstrate proper use of logical operators
o proper order of operations
o use any appropriate math function
provide output based on user input
o clear and well-organized output to share data and results
o show proper use of the str() function

Example of expected output: The output for your program should resemble the following screenshot.
Your specific results will vary, depending on the choices you make and the input provided.
Write your pseudocode here:

#Jacob Sarmiento

#10/26/2021

#2.06 Module Two Project

Def main():

#Store introduction

Print(“============================”)

Print(“Welcome to the clothing maniac!”)

Print(“============================”)

#custumer questions

Name = input(“What is your name?”)

Gender = input(“what is your gender?”)

Print(“Hello” + + “ , you have informed me that you are a “ + gender + “ . “)

Color = input(“what is your favorite color!”)

Weather = int(input(“What is the weather?”))

Print(“What is the weather? “ +str(weather))

If (weather > 50 and weather < 80):

Print(“You are allowed to wear short or long sleeves.”)

Else:

Print(“Please enter weather between 50 and 80.”)

Print(“ “)

Print(“your favorite color is “ + Color + “ , and it will be “ +str(weather) + “degrees


outside.”)

Print(“you’re going to be able “ +str(weather) + “degree weather , so I recommend” +


color + “ long or short, “ + color + “ beanie, a “ + color + “ shirt, and “ + color + Shoes.”)

Print(“ Thank you for shopping at Clothing maniac!”)


Print(“=================================================================”)
Main()
Python Code

Use the Python IDLE built into this course to code and run your program. Your code must:

Use comments for internal documentation (including a heading with your name, today’s date,
and a short description of the program). Remember that you can copy/paste much of your
pseudocode for this internal documentation.
Follow the Python style conventions regarding indentation and the use of white space in your
program.
Use meaningful names for all variables.
Run successfully and produce output similar to the example above.

When you’ve completed writing your program code, save your work by selecting ‘Save’ in the Python
IDLE. When you submit your assignment, you will turn in this Python file separately.

Step Four: Generalize & Assess


Complete the Post Mortem Review (PMR). Write thoughtful two- to three-sentence responses to all the
questions in the PMR chart.

Post Mortem Review Question Response

What was the purpose of your program? The purpose of this program is to help people
choose clothes for the weather

How could your program be useful in the real It will be good for finding the right clothes very
world? fast

What is a problem you ran into, and how did you I did it disorganized so I tried my best to clean it
fix it? up

Describe one thing you would do differently the Next time I want to be able to understand it
next time you write a program. more

How could your program be generalized and You can add translations so other countries can
useful in other areas? use it

Common questions

Powered by AI

Comments in Python code provide explanations of code functionality and purpose. They help maintain clarity by detailing processes, logic decisions, and variable use, crucial for future updates and maintenance by different programmers, supporting long-term program sustainability .

Decomposition allows developers to break down a complex retail problem into smaller, manageable parts. For instance, a salesperson realizes customers struggle to decide on vacation attire and feels pressured by traditional sales interactions. By decomposing, the programmer can identify separate tasks such as determining factors that influence clothing choices, creating user-friendly interfaces, and implementing decision-making algorithms to recommend appropriate attire based on user inputs .

Algorithmic design is crucial as it involves creating structured steps to solve specific problems like selecting vacation attire based on user inputs such as temperature, gender, and favorite color. This ensures the program efficiently guides customers in making optimal purchasing decisions, enhancing user satisfaction and market competitiveness .

The program can incorporate translations and localization features to serve non-English speaking users globally. Integration with global weather data APIs and culture-sensitive fashion advice ensures its recommendations are accurately based on international contexts, maintaining relevance and broadening its utility .

Repetitive statements and nested if-else conditions help manage user input dynamically, allowing the program to evaluate multiple conditions and perform corresponding actions. For example, suggesting clothing based on temperature ranges and implementing conditional checks to personalize recommendations enhances user interaction and program functionality .

Logical operators (such as AND, OR) and proper order of operations enable the program to correctly analyze multiple conditions simultaneously. For instance, ensuring recommendation accuracy requires checking temperature falls within specific ranges and that inputs align with user expectations, resulting in reliable clothing suggestions .

Effective strategies include organizing code for readability, using comments for clarity, and iteratively testing sections. Addressing common issues like input validation errors and ensuring logical structure improve functionality. Continuous revision and feedback help refine the program towards optimal performance .

Conducting a PMR offers insights into the program's purpose, effectiveness, encountered challenges, and improvement areas. It provides reflections that help in recognizing strengths and weaknesses, fostering development of better strategies for future projects and ensuring continuous learning and growth .

The program's output should use formatted print statements, clear separations between sections, and simple language to communicate recommendations. Displaying inputs and results in a structured format helps users understand their choices and the program's suggestions efficiently, enhancing the user interface .

Patterns indicate that customers often struggle with choosing the right clothing for vacations due to unfamiliarity with appropriate attire for different weather conditions. This insight can be used to tailor a program that collects crucial data such as vacation destination weather and customer preferences to recommend suitable clothing options .

You might also like