HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Quizzes
  2. /A function picks a word for a temperature with if, elif and a final return. What does the program print?
Python ProgrammingEasyHigh School (9–10)Python Basics › Conditionals: if, elif, elsePCEP (Python Institute)
StemPy LabCreated by StemPy Lab

A function picks a word for a temperature with if, elif and a final return. def label(t): if t > 30: return "hot" elif t > 20: return "warm" elif t > 10: return "mild" return "cold" print(label(30), label(10), label(21)) What does the program print?

Log in to save
← All Quizzes
← A program turns four floats into whole numbers, three with round() and one with int(). What does the program print?A function puts new numbers at the end of a list while a for loop runs over range(len(vals)). What does the program print? →
More onPython Basics › Conditionals: if, elif, else

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. A function decides with not, or and and in one condition, and has no brackets to show the order.…Hard
  2. Each number of a list should give one letter: A, B or C. The test in the if line is left out, and…Medium
  3. A program reads an operator and a number from the keyboard, and passes both to a function. The…Medium
  4. A function sorts values by whether they count as true or false in an if test. What does the…Medium
  5. A program checks a basket, which is a list, before it adds a fruit. What does the program print?Easy
All questions on this topic →

Problems on this topic

  1. Write a simpler condition, without a not in front of a bracket, that is the same as each of these…Medium
  2. At a club door the guard asks the age first…Medium
  3. This program should say a vowel only for the letters a, e, i, o and u…Medium
  4. The ticket price rules are: under 5 free, under 13 pays 50, under 60 pays 100, and the rest pay 70…Medium
All problems on this topic →