[SOLVED] CS150 # Homework 1 If/Else

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Homework1-ewp4bb.zip (3.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

# Homework 1 If/Else
Ask the user if they are taking a class (enter y, Y, n or N). If they are not taking a class print “Thanks for using the system.” and close the program. If they are taking a class proceed to ask for a grade as listed below. If the input is any character other than Y, y, N or n print “Invalid input” and close. This should work regardless of capital or lowercase inputs. Use if / else if / else for this part.

If and only if the user is taking a class, ask them to enter a letter grade (A, B, C, D, or F, uppercase or lowercase). If they enter A or B, print “Great Job!”. If they enter C print “You’re doing alright.” If they enter D or F print “You can improve.” If they enter anything else then print “Invalid grade.” Regardless of input then close (including invalid). Use a switch statement for this portion. Hint: remember cases can spill through until a break and remember the default case. This should ONLY run if the user is taking a class! (Remember nesting).

  • Homework1-ewp4bb.zip