Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
ExperiencesCoaching
New
Practice
Mock InterviewsTimed interview simulations with feedbackSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Get started
Print Numbers From 10 to 20
00:00
5 left

Print Numbers From 10 to 20

EasyPython

Problem

A healthcare technology's clinician dashboard needs a small, ordered sequence of numeric labels for a display component. Implement a function that generates every integer from 10 through 20, inclusive, in ascending order.

Although the sequence may be printed by the caller, your function must return the generated numbers as a list so the result can be tested directly.

Formal Specification

Implement print_numbers_10_to_20() with no parameters.

  • Input: No input arguments.
  • Output: A list of integers containing each number from 10 through 20, inclusive, in ascending order.
  • Each number must appear exactly once.

Constraints

  • The function accepts no arguments.
  • The output contains exactly 11 integers.
  • The values range from 10 through 20, inclusive.
  • The values are returned in ascending order.

Function Signature

def print_numbers_10_to_20():
Interviewer

Your question is Print Numbers From 10 to 20. Start with the requirements in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
Code
Sign up free to run your codeLog inLn 2
Run your code to see test output here.