Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
7.6k views
in Computer by (15.7k points)

Krrishnav is looking for his dream job but has some restrictions. He loves Delhi and would take a job there if he is paid over Rs.40,000 a month. He hates Chennai and demands at least Rs. 1,00,000 to work there. In any another location he is willing to work for Rs. 60,000 a month. The following code shows his basic strategy for evaluating a job offer. 

Code: 

pay= _________ location= _________ 

if location == "Mumbai": 

print ("I’ll take it!") #Statement 1 

elif location == "Chennai": 

if pay < 100000: 

print ("No way") #Statement 2 

else: 

print("I am willing!") #Statement 3 

elif location == "Delhi" and pay > 40000: 

print("I am happy to join") #Statement 4 

elif pay > 60000: 

print("I accept the offer") #Statement 5 

else: 

print("No thanks, I can find something better")#Statement 6 

On the basis of the above code, choose the right statement which will be executed when different inputs for pay and location are given.

 i. Input: location = "Chennai”, pay = 50000 

a. Statement 1 

b. Statement 2 

c. Statement 3 

d. Statement 4

ii. Input: location = "Surat" ,pay = 50000 

a. Statement 2 

b. Statement 4 

c. Statement 5 

d. Statement 6

iii. Input- location = "Any Other City", pay = 1 

a Statement 1 

b. Statement 2 

c. Statement 4 

d. Statement 6

iv. Input location = "Delhi", pay = 500000 

a. Statement 6 

b. Statement 5 

c. Statement 4 

d. Statement 3

v. Input- location = "Lucknow", pay = 65000 

i. Statement 2 

ii. Statement 3 

iii. Statement 4 

iv. Statement 5 

Please log in or register to answer this question.

1 Answer

+2 votes
by (15.2k points)

1. Correct Answer : ii. Statement 2

2. Correct Answer: d. Statement 6

3. Correct Answer: d. Statement 6

4. Correct Answer: c. Statement 4

5. Correct Answer: d. Statement 5

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...