MCQs > IT & Programming > Python > Output of the following Python language code? def ps(a,b = 2): return a + b a=8 s1 = 1 i = 1 while i <= a: s1 = s1 + i *2 i = i+1 print(ps(a=1) + ps(a=1, b=3)+s1)

Python MCQs

What will be the correct output of the following Python language code?

def ps(a,b = 2):

  return a + b

a=8

s1 = 1

i = 1

while i <= a:

   s1 = s1 + i *2

   i = i+1

print(ps(a=1) + ps(a=1, b=3)+s1)


Answer

Correct Answer:

80 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

More Python MCQ Questions

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it