Reference no: EM132472153
BIT 100 - Introduction To Programming - HELP University
Learning Outcome 1: Explain the steps involved in program development.
Learning Outcome 2: Discuss elements of good programming style.
Learning Outcome 3: Write programs to solve basic computing problems.
Problem 1:
EcoSave is an organization that aims to contribute towards efforts to combat climate change. One of the problems in communities is difficulty finding recycling centers to submit materials. EcoSave aims to overcome this by encouraging community members to become collectors for recyclable materials. Collectors will receive points for collecting materials, and recyclers will also receive points for submitting materials.
Your task is to write a Python program to facilitate collectors and recyclers to count their points for membership status.
In order to do this, your program will have two main functionalities:
i. Points Calculator
ii. Membership Tier Info
Your program should be contained in one main function which call different functions to perform each of the task below. An introduction on the program and welcome message will be shown every time the program restart.
Assessment Task 1
Create a function named inputDetails which do not accept any argument and return seven parameters namely userName, gender, age, paperQuantity, plasticQuantity, oilQuantity, electricQuantity. This function should prompt the user to input the following details:
i. Name
ii. Gender (The program should be able to cater for different input formats. Example: user may input ‘F' or ‘f' or ‘female')
iii. Age (integer). No validation required.
iv. Quantity of paper (integer/float). No validation required.
v. Quantity of plastic (integer/float). No validation required.
vi. Quantity of cooking oil (integer). No validation required.
vii. Quantity of electrical (integer). No validation required.
Assessment Task 2
Create a menu which will be generated every time the user restarts the program. This menu will also be shown after the output for each option. The menu should be coded in a function named menu. Your menu should allow user to choose between the available options, accepting only valid choice. Prompt the user to input again if the choice given is invalid. This function should return choice which stores the value chosen by the user.
Assessment Task 3
Program the first functionality of the program: Points Calculator. This should be contained in a function pointCalculator which accepts four arguments paperQuantity, plasticQuantity, oilQuantity, and electricQuantity and return the collectorPoint and recyclerPoint. Use details in Table 1 to calculate points value.
Table 1: Points of recyclables for collector.
Recyclables
|
Points
|
Paper
|
30
|
Plastic
|
50
|
Cooking oil
|
70
|
Electrical
|
90
|
Sample calculation: If collector collected 1.3kg of of paper, 2kg of plastic, one bottle of cooking oil and two unit of electrical, the total points collected are: (1.3 × 30) + (2 × 50) + (1 × 70) + (3 × 90) = 479
Table 2: Points of recyclables for recycler
Recyclables
|
Points
|
Paper
|
40
|
Plastic
|
60
|
Cooking oil
|
80
|
Electrical
|
100
|
Sample calculation: If recycler recycled 1.3kg of paper, 2kg of plastic, one bottle of cooking oil and two unit of electrical, the total points collected are: (1.3 × 40) + (2 × 60) + (1 × 80) + (3 × 100) = 552
Assessment Task 4
Expand your program by including the second functionality: Membership Tier Information. This option allows user to review their membership tier and points required to upgrade to a higher level. This should be contained in a function viewMembership which accepts three arguments name and collectorPoint and recyclerPoint and return the status and remainingPoint.
Table 3: Membership Tier
Tier
|
Points
|
Eco Saver
|
500 and above
|
Eco Hero
|
800 and above
|
Eco Warrior
|
1000 and above
|
Assessment Task 5
Your program allows user to reset the input detailsby user when option 3 is chosen. This option will prompt the user to input the personal and recyclable details again. User may continue to choose the functionality from the options given to compute new points calculation and membership tier information based on the new input given by user.
Problem 2
The process of creating a program is often broken down into stages according to the information that is produced in each phase. We learned about the 6 steps of Software Development Process in Lecture
2. Described the steps of developing that program - giving the required information in each step. With the exception of the implementing the design (as it is Problem 1), you need to give the documentation/information produced for the other five steps.
Attachment:- Introduction To Programming.rar