STEP 10: We're almost done with this function! Let's use the user's input to change the stars.

  • In , drag Return Statement indented inside get_user_input().
  • To make our program simpler, we'll return the user's input as a list. Change my_var to [number, color].
  • Finally, inside main(), find this line: create_stars(100,·"yellow")
  • Change 100 to user_input[0] and "yellow" to user_input[1]. Click Run to see what happens!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)