Week06 - Conditional II
Week06 - Conditional II
Week 06 Condition II
Specification
In the requirement that states [Attachment], please download the Template file
from the Grader and submit only the file(s) that have the specified names for each
respective task.
NOTE: delete "pass" keyword before edit the function in template file
Input Output
50 First prize
25 Second prize
70 No prize
90 Second prize
204101 Section 701-703 2/6
NOTE: delete "pass" keyword before edit the function in template file
Input Output
car_density = 4
False
car_speed = 80
car_density = 7
True
car_speed = 70
car_density = 4
True
car_speed = 100
car_density = 7
False
car_speed = 60
204101 Section 701-703 3/6
NOTE: delete "pass" keyword before edit the function in template file
Input Output
Input weight in kilograms: 55 BMI: 24.444444444444443
Input height in centimeters: 150 Transation of BMI: Normal weight
Input weight in kilograms: 45 BMI: 18.49112426035503
Input height in centimeters: 156 Transation of BMI: Underweight
Input weight in kilograms: 80 BMI: 24.968009737523797
Input height in centimeters: 179 Transation of BMI: Obese
204101 Section 701-703 4/6
The function should consider leap years using the is_leap_year function.
NOTE: delete "pass" keyword before edit the function in template file
Input Output
month = 2
29
year = 2020
month = 4
30
year = 2021
month = 12
31
year = 2022
204101 Section 701-703 5/6
Input Output
day = 29
Invalid date
month = 2
day = 18
Gemini
month = 6
day = 23
Capricorn
month = 12
day = 10
Virgo
month = 9
204101 Section 701-703 6/6
Submission
1. The format and order of input/output messages must follow the example
provided during the program execution.
2. The submitted program file must include comments at the beginning of the file
as specified in the course Canvas instructions.
3. The submitted program file must include pseudocode comments for each step of
the program as specified.
4. Upload the source code file to the designated homework submission website
specified for each task at http://cmu.to/grader204101
5. Check the grader instructions from https://cmu.to/instruction