subject

Assignment Notes 1. To clarify the project specifications, sample output is provided at the end of this document. 2. Your program must accept user inputs in the order specified. 3. Python 3 provides formatting for the dollar output. A comma (,) causes commas to be properly placed in numbers. Note that the ordering matters so that comma is placed immediately after the colon and before other formatting marks, e. g. {:,.2) Experiment in the shell. 4. The string method lower() can be used to convert all letters in a string to lower case. This is particularly useful for input, that is you can handle "Es", "yeS", "YES", etc. by converting the input to lower case and checking against "yes". 5. The Python None is a useful default initialization for variables that may not be assigned a value. For example, not everyone is asked for their college so initializing college to None can be handy because None evaluates as False in a Boolean expression. college = None if college: print("this will not print if college has the value None") 6. Notes on handling input errors: • For "yes/no" questions, assign all answers that are not "yes" to be "no". • For the question about college that has an option of "none", assign any answer to be "none" (or None, if you wish) for any response that is not one of the specified colleges. • For level, if the answer is not one of the specified responses ("freshman", etc.), you must print an error message "Invalid input. Try again." and re-prompt until you get a specified response. • For credits, input must be an integer greater than zero. Print an error message "Invalid input. Try again." and re-prompt until you get an integer greater than zero. Hint: the string isdigit() method is useful here. 7. Common error to avoid. You might like to use a Boolean expression such as this: level == 'freshman' or 'sophomore' or 'junior' or 'senior' Unfortunately, that expression always evaluates to True because any non-empty string is True so it is effectively: level == 'freshman' or True or True or True Instead use the following (level == 'freshman') or (level == 'sophomore') \ or (level == 'junior') or (level == 'senior') 8. You are responsible for following the coding standard items 1-6 9. You are not allowed to use advanced data structures such as list, dictionaries, classes, etc. However, you are allowed to read ahead and use try-except and functions. 10. "Hard-coded answers" will receive a zero score for the project. That is, if you design your code to handle the specific test cases rather than the general problem, you will not get credit. Sample Output TEST 1 2021 MSU Undergraduate Tuition Calculator. Enter Level as freshman, sophomore, junior, senior: freshman Are you admitted to the College of Engineering (yes/no): no Are you in the James Madison College (yes/no): no Credits: 12 Tuition is $7,259.00. Do you want to do another calculation (yes/no): no TEST 2 2021 MSU Undergraduate Tuition Calculator. Enter Level as freshman, sophomore, junior, senior: Junior Enter college as business, engineering, health, sciences, or none: business Credits: No Invalid input. Try again. Credits: 17 Tuition is $8,850.00. Do you want to do another calculation (yes/no): no TEST 3 2021 MSU Undergraduate Tuition Calculator. Enter Level as freshman, sophomore, junior, senior: Senior Enter college as business, engineering, health, sciences, or none: engineering Credits: 5 Tuition is $3,559.00. Do you want to do another calculation (yes/no): Yes Enter Level as freshman, sophomore, junior, senior: sophomore Are you admitted to the College of Engineering (yes/no): yes

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
The most common battery cable terminal is a that provides a large surface contact area with the ability to tighten the terminal onto the battery post using a nut and bolt.
Answers: 2
question
Computers and Technology, 23.06.2019 02:00
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
What can a word user do with the customize ribbon dialog box? check all that apply. minimize the ribbon add a new tab to the ribbon remove a group from a tab add a group to a tab choose which styles appear choose which fonts appear choose tools to appear in a group
Answers: 1
question
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
You know the right answer?
Assignment Notes 1. To clarify the project specifications, sample output is provided at the end of t...
Questions
Questions on the website: 13722360