Computers and Technology

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

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 20:40, bobby3350
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
image
Computers and Technology, 23.06.2019 21:30, jayybrain6337
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
image
Computers and Technology, 24.06.2019 00:10, roxymiller3942
Read each statement below. if the statement describes a peer-to-peer network, put a p next to it. if the statement describes a server-based network, put an s next to it. p - peer-to-peer s - server-based
Answers: 1
image
Computers and Technology, 24.06.2019 00:30, petergriffin6772
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
Do you know the correct answer?
Assignment Notes 1. To clarify the project specifications, sample output is provided at the end of t...

Questions in other subjects:

Konu
Mathematics, 11.01.2021 04:10
Konu
Mathematics, 11.01.2021 04:10
Konu
Mathematics, 11.01.2021 04:10
Konu
Mathematics, 11.01.2021 04:10