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

 

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

Write a function, stars, that is given a three element list of integers. The function should generate a string consisting of three substrings. Each substring should terminate with the ':' character and should consist of a series of '*' characters, where the number of '*'s is given by the corresponding element of the list.


stars([4, 3, 2]) → '****:***:**:'
stars([2, 1, 5]) → '**:*:*****:'
stars([1, 0, 1]) → '*::*:'

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

def stars(L):

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