MCQs > IT & Programming > Python > Output of the following Python code? def ps(a,b): s = a + b return (s, a) s, a = ps(0,4) a=a+4 s1 = 1 i = 1 while i <= a: s1 = s1 + i i = i+1 print(s1)

Python MCQs

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

def ps(a,b):

  s = a + b

  return (s, a)

s, a = ps(0,4)

a=a+4

s1 = 1

i = 1

while i <= a:

   s1 = s1 + i

   i = i+1

print(s1)


Answer

Correct Answer:

11 

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

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it