Grade 6 · Computer science
Grade 6 Algorithms & logic worksheet
20 questions on algorithms & logic. The answer key is a separate download.
What is on the worksheet
Start with total = 76. Repeat 24 times: add 5 to total. What is the final total?
Start with total = 9. Repeat 28 times: add 5 to total. What is the final total?
Start with total = 5. Repeat 18 times: add 14 to total. What is the final total?
Using zero-based indexing, what is values[0] for values = [43, 77, 40, 77, 69]?
FOR i FROM 7 TO 35 INCLUSIVE STEP 7: print i. How many numbers are printed?
FOR i FROM 2 TO 30 INCLUSIVE STEP 4: print i. How many numbers are printed?
Start with total = 5. Repeat 28 times: add 19 to total. What is the final total?
Using zero-based indexing, what is values[3] for values = [66, 88, 86, 56, 98]?
Using zero-based indexing, what is values[2] for values = [68, 64, 95, 81, 19]?
Using zero-based indexing, what is values[4] for values = [96, 7, 4, 25, 91]?
Using zero-based indexing, what is values[1] for values = [78, 32, 15, 72, 1]?
FOR i FROM 7 TO 87 INCLUSIVE STEP 4: print i. How many numbers are printed?
FOR i FROM 14 TO 46 INCLUSIVE STEP 8: print i. How many numbers are printed?
FOR i FROM 8 TO 86 INCLUSIVE STEP 3: print i. How many numbers are printed?
Start with total = 26. Repeat 17 times: add 19 to total. What is the final total?
Start with total = 34. Repeat 37 times: add 5 to total. What is the final total?
Convert the binary number 100110100 to decimal.
Convert the binary number 1011001010 to decimal.
FOR i FROM 12 TO 124 INCLUSIVE STEP 8: print i. How many numbers are printed?
FOR i FROM 6 TO 105 INCLUSIVE STEP 9: print i. How many numbers are printed?
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 Mathematics practice
20 questions
Grade 6 Fractions worksheet
20 questions
Grade 6 Geometry worksheet
20 questions