Due Date
See the
calendar for due date.
Assignment:
Write a program that asks the user for the number of males and the number of females registered in a class using two separate inputs. The program should display the percentage of males and females, rounded to the nearest integer using string formatting.
Examples
The following are a examples of correct execution (with the text in
bold being the input from the user):
Enter number of females: 50
Enter number of males: 50
Percent females: 50.0%
Percent males: 50.0%
Enter number of females: 22
Enter number of males: 5
Percent females: 81.5%
Percent males: 18.5%
After completing the program and testing the output for accuracy, make sure that you have a comment lines at the top of your file with your name, course and section, current date, and assignment description.
Submission
Submit your python script using the
handin program. For
handin, for this lab, type the following in a terminal window exactly as it appears:
handin pe2 pe2.py
To verify your submission, type the following in a terminal window:
handin pe2
Optional
Made the output match
exactly (meaning every character is the same) to the examples above.