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

 

david.white@denison.edu cs112fall2015 > squares_better
prev  |  next  |  chance

Write a function squares(n) that returns a list containing the squares of the integers 1 through n. Use a for loop.


squares_better(4) → [1, 4, 9, 16]
squares_better(1) → [1]
squares_better(5) → [1, 4, 9, 16, 25]

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

def squares_better(n):

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

Copyright Nick Parlante 2017 - privacy