about | help | code help+videos | done | prefs |
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) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy