StudyBrixFree worksheets, study guides and courses

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

  1. Start with total = 76. Repeat 24 times: add 5 to total. What is the final total?

  2. Start with total = 9. Repeat 28 times: add 5 to total. What is the final total?

  3. Start with total = 5. Repeat 18 times: add 14 to total. What is the final total?

  4. Using zero-based indexing, what is values[0] for values = [43, 77, 40, 77, 69]?

  5. FOR i FROM 7 TO 35 INCLUSIVE STEP 7: print i. How many numbers are printed?

  6. FOR i FROM 2 TO 30 INCLUSIVE STEP 4: print i. How many numbers are printed?

  7. Start with total = 5. Repeat 28 times: add 19 to total. What is the final total?

  8. Using zero-based indexing, what is values[3] for values = [66, 88, 86, 56, 98]?

  9. Using zero-based indexing, what is values[2] for values = [68, 64, 95, 81, 19]?

  10. Using zero-based indexing, what is values[4] for values = [96, 7, 4, 25, 91]?

  11. Using zero-based indexing, what is values[1] for values = [78, 32, 15, 72, 1]?

  12. FOR i FROM 7 TO 87 INCLUSIVE STEP 4: print i. How many numbers are printed?

  13. FOR i FROM 14 TO 46 INCLUSIVE STEP 8: print i. How many numbers are printed?

  14. FOR i FROM 8 TO 86 INCLUSIVE STEP 3: print i. How many numbers are printed?

  15. Start with total = 26. Repeat 17 times: add 19 to total. What is the final total?

  16. Start with total = 34. Repeat 37 times: add 5 to total. What is the final total?

  17. Convert the binary number 100110100 to decimal.

  18. Convert the binary number 1011001010 to decimal.

  19. FOR i FROM 12 TO 124 INCLUSIVE STEP 8: print i. How many numbers are printed?

  20. FOR i FROM 6 TO 105 INCLUSIVE STEP 9: print i. How many numbers are printed?

More worksheets like this