Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

What will be the output of the following Python code?

Asked by Aaditya Srivastva Dec 20, 2023 1.2K views 1 answer
Share

About this question

 There is a class in which students' ages are determined by their t-shirt categories which are small, medium, and large. If there are two students ages 8 and 12 respectively, what would be the size of their t-shirt category? Provide the output based on the following Python code:-

Def mystery(num):

    If num > 10:
        Return “Big”
    Elif num > 5:
        Return “Medium”
    Else:
        Return “Small”
Result = mystery(8) + “ “ + mystery(12)
Print(result)

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.