Question: Use Python following: - if the value typed in is a 1 or a 2 then increment yesCount and print out YES WAS RECORDED -

Use Python following: - if the value typed in is a 1Use Python

following: - if the value typed in is a 1 or a 2 then increment yesCount and print out "YES WAS RECORDED" - if the value typed in is a 3 or an 4 then increment noCount and print out "NO WAS RECORDED" If the input is invalid just print the message "INVALID" and do nothing else. 14of14:2023-02-0515:07:36-W 1 response == stdin. nextInt (); 2 switch (response) \{ 3 case 1 : 4 yesCount++; 5 System. out. print ("YES WAS RECORDED"); 6 break; 7 case 2: 8 yesCount++; 9 System. out. print ("YES WAS RECORDED"); 10 break; 11 case 3 : 12 noCount++; 13 System. out. print ("NO WAS RECORDED"); 14 break; 15 case 4: 16 noCount++; 17 System. out. print ("NO WAS RECORDED"); 18 break; 19 20 if default: System. out. print("INVALID")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!