id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amgreyson@gmail.com > listNumbers
prev  |  next  |  chance

Given a natural number input, write a function that uses an iterative (non-recursive) solution to return a list of the numbers from 1 to the input value, in that order.


listNumbers(10) → [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
listNumbers(5) → [1, 2, 3, 4, 5]
listNumbers(1) → [1]

...Save, Compile, Run (ctrl-enter)

def listNumbers(aWholeNumber):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 150

Copyright Nick Parlante 2017 - privacy