मराठी

Predict the output of the Python code given below: emp = {"Arv": (85000,90000),"Ria": (78000,88000),"Jay": (72000,80000),"Tia": (80000,70000)} selected = [ ] for name in emp: salary = emp[name] - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Predict the output of the Python code given below:

emp = {"Arv": (85000,90000),"Ria": (78000,88000),"Jay": (72000,80000),"Tia":
 (80000,70000)}
selected = [ ]
for name in emp:
   salary = emp[name]
   average = (salary[0] + salary[1])/2
   if average > 80000:
      selected.append(name)
print(selected)
कोड लेखन
Advertisements

उत्तर

['Arv', 'Ria']
shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×