Grade 7 · Computer science
Grade 7 Algorithms & logic worksheet
20 questions on algorithms & logic. The answer key is a separate download.
What is on the worksheet
Using zero-based indexing, what is values[2] for values = [62, 73, 9, 39, 56]?
Start with total = 7. Repeat 5 times: add 12 to total. What is the final total?
FOR i FROM 3 TO 48 INCLUSIVE STEP 5: print i. How many numbers are printed?
FOR i FROM 9 TO 41 INCLUSIVE STEP 8: print i. How many numbers are printed?
Using zero-based indexing, what is values[2] for values = [59, 80, 71, 61, 48]?
Start with total = 79. Repeat 7 times: add 18 to total. What is the final total?
Using zero-based indexing, what is values[0] for values = [38, 22, 86, 22, 41]?
FOR i FROM 15 TO 159 INCLUSIVE STEP 9: print i. How many numbers are printed?
Computing foundations: which term fits this description? A named input in a function definition.
- Variable
- Parameter
- Input
- Integer
Using zero-based indexing, what is values[1] for values = [15, 69, 73, 83, 30]?
Using zero-based indexing, what is values[3] for values = [60, 50, 76, 5, 25]?
Using zero-based indexing, what is values[4] for values = [60, 40, 45, 27, 23]?
FOR i FROM 9 TO 153 INCLUSIVE STEP 8: print i. How many numbers are printed?
FOR i FROM 13 TO 115 INCLUSIVE STEP 6: print i. How many numbers are printed?
Using zero-based indexing, what is values[0] for values = [78, 22, 56, 90, 68]?
Convert the binary number 1010100111 to decimal.
FOR i FROM 7 TO 25 INCLUSIVE STEP 9: print i. How many numbers are printed?
Start with total = 28. Repeat 14 times: add 5 to total. What is the final total?
Using zero-based indexing, what is values[4] for values = [9, 89, 68, 64, 2]?
Using zero-based indexing, what is values[0] for values = [86, 98, 57, 76, 91]?
More worksheets like this
Grade 5 Computer science practice
20 questions
Grade 5 Algorithms & logic worksheet
20 questions
Grade 5 Digital literacy worksheet
20 questions
Grade 6 Computer science practice
20 questions
Grade 6 Algorithms & logic worksheet
20 questions
Grade 6 Digital literacy worksheet
20 questions