Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help stuck and confused Project Objectives Use loops Use functions, parameter-passing, and modules for a very modular program Use incremental development to write and

Please help stuck and confused

image text in transcribed

image text in transcribed

image text in transcribed

Project Objectives Use loops Use functions, parameter-passing, and modules for a very modular program Use incremental development to write and test your program NO GLOBAL VARIABLES ALLOWED Project Overview To graduate from high school, the students need to five tests on Math, English, Physics, History, and Biology. Write a program that asks the user to input a student's grades (0-100) of the 5 courses, and evaluates the grades to determine whether he can graduate. When the program starts, it first prints out messages asking the user to input the grades of the five courses. The program evaluates the grades and prints out a message telling the user whether this student can graduate based on the following graduation policy: 1. The average of the grades should be more than or equal to 85. (Required) 2. The lowest grade should be more than or equal to 75. (Required) 3. The highest grade should not be more than 20 points higher than the lowest grade. (Conditional) 4. If condition 3 is not met, the student should be lucky. The program is given 5 chances to roll a dice with 6 surfaces with values from 1 to 6. If out of the 5 chances, the program never hits 6, the student cannot graduate Deliverables The deliverable for this project is the following archive file: proj03_LastName A zip file that contains 2 separate .py files. Be sure to use the specified file(s) name(s) and to submit it for grading via eLearning before the project deadline. Provide this information in gradesCalculate.py: # Project No.: # Author: # Description: Project Structure The project contains 2 separate.py files (as known as modules) in a single PyCharm project 1. gradesCalculate Module: contains 5 functions (& the call to main to start the program execution). a) main(): Gets 5 grades from the user (Do input validation for all grades (Must be 0-100). b) minGrade(): This method takes all the grades as input and returns the lowest grade. c) maxGrade(): This method takes all the grades as input and returns the highest grade. d) average Grade(): This method takes all the grades as input and calculates the average grade. e) evaluate(): This method takes (lowest, highest, and average) grades as input and returns a Boolean value. The return value means whether this student can graduate or not. 2. luckyModule Module - contains 1 function: a) isLucky(): This method returns a Boolean value that indicates whether the student is lucky. It generates a random number range from 1 to 6 once at a time. If 6 is generated at any time, return true otherwise return false. Note/ use the break statement that can be used in both while and for loops. . Input (for 1 student) Use appropriate prompts to get 5 data items from the user: Integer numbers (grades) for Maths, English, Physics, History, and Biology . Input - Multiple students After handling a single student (IPO for it: input/validate the data, do calculations, print do you want to continue), ask the users if they want to enter the grades of another student (Y/y for YES or N for NO). If they say YES: Y (ory), then go around the big loop again. If they say No: N (or n), the program will exit. Sample Output (use EXACT format - and NO HARDCODING of the data itself) Enter Student's Grades (0-100): Maths: 100 English: 95 Physics: 80 History: 85 Biology: 90 The student can graduate! Do you want to continue? Y Enter Student's Grades (0-100): Maths: 100 English: 95 Physics: 75 History: 85 Biology: 90 The student should be lucky: Rolling the dice... 1 Rolling the dice... 5 Rolling the dice... 4 Rolling the dice... 1 Rolling the dice... 3 The student cannot graduate! Do you want to continue? y Enter Student's Grades (0-100): Maths: 100 English: 95 Physics: 75 History: 85 Biology: 90 The student should be lucky: Rolling the dice... 1 Rolling the dice... 6 The student can graduate! Do you want to continue? y Enter Student's Grades (0-100): Maths: 100 English: 95 Physics: 60 History: 85 Biology: 90 The student cannot graduate! Do you want to continue? Y Enter Student's Grades (0-100): Maths: 100 English: 95 Physics: 60 History: 60 Biology: 40 The student cannot graduate! Do you want to continue? N

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

5-49. Lying on the shelf, Ruby saw the seashell.

Answered: 1 week ago