0% found this document useful (0 votes)
17 views

Module Project Fop

Uploaded by

Dhruv Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Module Project Fop

Uploaded by

Dhruv Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 6

04.

06 Module Four Project

Name:

Directions

If you are up for a programming challenge, read on. If not, take a deep breath and then read on. You will
use the software development life cycle (SDLC) to create a working program of your choice that will test
Boolean conditions based on user input. Your program can include any Python skills and functions you
have learned up to this point.

This assignment has five parts.

Step One: Planning & Analysis


Read the options carefully and choose ONE as the basis of your project.

Option 1 – Members Only

If you were going to create a club, what would it be and how could people join? Think about the
membership requirements. Would members have to be between certain ages? Would they have to like
certain things? Would they need certain skills? Because you are president of the club, you get to decide
the criteria! (Just make sure the conditions are school appropriate.)

Follow these steps to begin your planning:

1. 1. Create a club name and explain your club's purpose.

2. 2. List the conditions (at least 3) to be a member of your club. Remember you have learned
about if, if-else, elif, and logical operators (and, or, not), so you can test for just about anything.

Option 2 – Discount Deals

Saving money makes people smile! So, your job is to spread the cheer by coming up with a discount
plan. For example, maybe people who are under 18 with honor roll get $5 off the admission price.
Maybe you want to reward honor roll students, military personnel, or state residents with free parking.
Since this is your discount plan, you get to decide the criteria. (Just make sure the conditions are school
appropriate.)

Follow these steps to begin your planning:

1. 1. Choose a place (amusement park, movie theatre, sporting event, online store, etc.) and
explain your discount program.
2. 2. List the conditions (at least 3) to qualify for a discount. Remember you have learned
about if, if-else, elif, and logical operators (and, or, not), so you can test for just about anything.

Option 3 – Programmer’s Adventure


If you want to journey the road less traveled and create your own program option, go for it! Keep in
mind, the goal of your program is to evaluate at least three conditions based on user input. Remember
you have learned about if, if-else, elif, and logical operators (and, or, not), so you can test for just about
anything.

Possible Program Options:

• • Eye on the Prize – Create a contest and the conditions to win.

• • Let Them Eat Cake! – Order a cake based on certain conditions.

• • Dream Destination – Suggest a vacation destination based on certain conditions.

Step Two: Design


It’s time to design your program by writing pseudocode. Be sure detail the input, calculations, decisions,
and output. Your program must include the following elements:

• • Input statements
• ♣ Three input statements requesting data (numeric or non-numeric) from the user
• ♣ Use of the int() and float() functions, if needed
• • Decision statements
• ♣ One if, if-else, or elif statement
• ♣ One logical operator (and, or, not) in a Boolean condition
• • Output statements
• ♣ Create clear and well organized output to display messages that show the user’s
input and the results of the decision statements.
• ♣ Show proper use of the str() function, if needed.
• • Optional
• ♣ Use a list to store values.

Insert your pseudocode here:

Input

Ask the user for their age.


Ask the user if they are interested in environmental conservation.
Ask the user if they can commit to volunteering at least once a month.
Calculations

Check if the user’s age is between 18 and 35.


Check if the user is interested in environmental conservation.
Check if the user can commit to volunteering once a month.

Output

If all conditions are met, tell the user that they qualify for membership.
Tell the user which condition they did not meet if any condition is not met.

Step Three: Coding

Use the following guidelines to write your program:

1. 1. To code the program, use the Python IDLE.


2. 2. Using comments, type a heading that includes your name, today’s date, and a short
description of the program.
3. 3. Follow the Python style conventions regarding indentation and the use of white space in
your program.
4. 4. Use meaningful names for all variables.

Example of expected output: The output for your program should resemble the following screen shot.
Your specific results will vary depending on the choices you make and the input provided.

Insert a copy of your code from the IDLE here:

# Name: Dhruv Gupta

# Date: 7/5/2024

# Description: This program checks if a user qualifies for membership in the Eco Explorers Club based on
certain criteria.

def main():
# Input Statements

name = input("Enter your name: ")

age = int(input("Enter your age: "))

interest = input("Are you interested in environmental conservation? (yes/no): ").

volunteering = input("Can you commit to volunteering at least once a month? (yes/no): ")

# Print Application Responses

print("Application Summary:")

print("Name: " + name)

print("Age: " + str(age))

print("Interest in environmental conservation: " + interest)

print("Willingness to volunteer monthly: " + volunteering)

# Decision Statements

if (age > 18 and age < 90):

if (interest == "yes"):

if (volunteering == "yes"):

print("Congratulations! You qualify for membership in the Eco Explorers Club.")

else:

print("You need to commit to volunteering at least once a month to qualify for


membership.")

else:

print("You need to have a keen interest in environmental conservation to qualify for


membership.")

else:
print("You need to be older than 18 and younger than 90 years to qualify for membership.")

main()

Step Four: Testing


Run your code and evaluate the output. Then, answer the following questions in the testing chart. Use
two to three meaningful sentences to answer each question.

Testing Question Response


When I tested, I observed that the program failed
What bugs did you identify in your code? to correctly determine membership eligibility for
users who met the age requirement but had an
incorrect interest in environmental conservation.
This issue happened from missing else statements
after nested conditions, which caused the program
to skip some eligibility checks.
I made sure to correctly indent every if statement
How did you fix the bugs? and add the necessary else statement.

Step Five: Maintenance


Passionate programmers strive to improve their code! In two to three meaningful sentences, answer the
following questions in the maintenance chart to consider the next steps of your program.
Maintenance Question Response
I could add more specific feedback on why a user
What design and functionality improvements did not qualify for membership and include an
could you make to your program? option to reapply with different input.

I can share the program with friends or club


How can you get feedback on ways to improve members and ask for their input on usability and
your program? functionality.

I can expand the program to include an application


How can you expand your program into a new, form with more details and I could make it so that
better program in the future? you don’t have to meet every single criterion to
make it in.
Many people might enter invalid data types, and
What are potential bugs users may possibly too many people who have all the criteria apply
encounter if your program is expanded into a new and there is not enough spots.
program in the future?

You might also like