Download presentation
Presentation is loading. Please wait.
Published byGarry Blair Modified over 8 years ago
1
L AB 4 July 5th
2
F OR LOOP Exercise 1: Find two ways of “Summing all 1, 2, and 3 digit prime numbers.” Use for loop Hint: isprime, primes
3
F OR LOOP
5
C ONVERT THE F OR LOOP TO W HILE LOOP Exercise 2:
6
C ONVERT THE F OR LOOP TO W HILE LOOP
7
F OR LOOP Exercise 3: Duplicate each element in an array Input: Array [1,2,3,4] Output: Array [1,1,2,2,3,3,4,4]
9
C HALLENGE Q UESTION : N ESTED L OOPS Exercise 4 Printing Out rows of Stars Ask the user for how many rows
10
C HALLENGE Q UESTION : N ESTED L OOPS
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.