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, 21.06.2019 22:30
Ted wants to go out to a neighborhood park and shoot pictures of dew drops on grass. he wants to get a low-level angle of the dew drops. which support equipment should ted use? a. mini tripod b. pistol grip c. monopod d. body mount
Answers: 2
question
Computers and Technology, 22.06.2019 20:00
Which location-sharing service offers items for users as a gaming component and also allows them to collectively link their check-ins to publish a trip? a. whrrl b. buzzd c. foursquare (this option is wrong i already tried) d. gowalla for plato
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
question
Computers and Technology, 22.06.2019 23:50
You need to design a circuit that implements the functions in the following table: s0 s1 function0 0 a + 10 1 a – b1 0 a + b1 1 a – 1s0 and s1 are 1-bit control inputs to select the function of the circuit. inputs a and b are 4-bitnumbers in 2s complement form. the output is also a 4-bit number in 2s complement form.you are allowed to use only one ttl 7483 4-bit adder to implement all the functions. but anynumber of other components (except the adder) can be used.hint: design a combinational logic circuit to modify the input b and the “carry input” of theadder depending on the control inputs s0 and s1.important: lab grade will depend on the working of the circuit & will be checked of by your labinstructor.1. is the output valid for the following input combinations: a. s0 = 0, s1 = 0, a = 7, b = 3? b. s0 = 0, s1 = 1, a = 7, b = 3? c. s0 = 1, s1 = 0, a = -4, b = -5? d. s0 = 1, s1 = 1, a = -8, b = 6? 2. what is the range of inputs (for both a and b) that will produce the valid output for all the functions?
Answers: 3
You know the right answer?
Assignment Notes 1. To clarify the project specifications, sample output is provided at the end of t...
Questions
question
Spanish, 04.12.2020 23:30
question
Mathematics, 04.12.2020 23:30
question
Mathematics, 04.12.2020 23:30
question
Geography, 04.12.2020 23:30
question
Mathematics, 04.12.2020 23:30
question
German, 04.12.2020 23:30
Questions on the website: 13722360