MCQs > IT & Programming > Python > Output of the following Python code? def f(): print (s) s = 'Me too.' print (s) s = 'Hi' f() print (s)

Python MCQs

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

def f():

print (s)

s = "Me too."

print (s)

s = "Hi"

f()

print (s)


Answer

Correct Answer:

Hi

Hi

Code will give a compilation error.


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