Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
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.
CodePython 3
You need to log in / sign up to run or submit.Ln 2
Run your code to see test output here.