# ============================================================ # PROGRAMMING FOUNDATIONS — LOOPS NOTES 1 — FOR LOOPS + RANGE() # INDEPENDENT PRACTICE — separate sandbox # ============================================================ # # NAME: # PERIOD: # # JuiceMind sandbox name: Foundations — Loops Notes — Practice # # DIRECTIONS: # Make a NEW JuiceMind sandbox for this practice (not your notes). # Do the challenges IN ORDER. Each one must run before you start the next. # Use your notes program as your reference — that's what it's for! # The last challenge is FROM SCRATCH: no starter code. # # ============================================================ # CHALLENGE 1 — ODD NUMBERS # ============================================================ # Print the odd numbers from 1 to 19 using a step. # # TEST IT: # Last: 19 # your code here # ============================================================ # CHALLENGE 2 — SQUARES # ============================================================ # Print n and n squared for n = 1..5. # # TEST IT: # 5 25 # your code here # ============================================================ # CHALLENGE 3 — VOWEL COUNTER # ============================================================ # Count the vowels in word with a for loop and in. # # TEST IT: # -> 3 word = "programming" # your code here # ============================================================ # CHALLENGE 4 — FACTORIAL # ============================================================ # Compute 6! (6*5*4*3*2*1) with a loop. # # TEST IT: # -> 720 # your code here # ============================================================ # CHALLENGE 5 — FROM SCRATCH — MULTIPLICATION ROW # ============================================================ # Ask for a number. Print it times 1 through 10, one per line, # like 7 x 3 = 21. # # TEST IT: # Input 7 -> 7 x 10 = 70 last # your code here