Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedUse 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

who to create module on python

Answered: 1 week ago

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

5. How do economic situations affect intergroup relations?

Answered: 1 week ago