Second help for knowing where to start:

26 Jan 2023 - 14:42 | Version 1 |
Carry out the process on a piece of paper. I will demonstrate:
  1. get a number from the file (say 1)
  2. get a number from the user (say 2)
  3. see that they are not the same and do nothing
  4. get the next number from the file (say 3)
  5. get the next number from the user (say 3)
  6. Indicate to the user that they were correct
  7. see that they are the same and save "1" as the count correct
  8. get the next number from the file (say 3)
  9. get the next number from the user (say 3)
  10. Indicate to the user that they were correct
  11. see that they are the same and save "2" as the count correct
  12. get the next number from the file (say 2)
  13. get the next number from the user (say 4)
  14. see that they are different and don't change the count correct
  15. Indicate to the user that they got 2 correct on that line
  16. reset the count correct to 0
Continue doing this for an entire file.
Once, done with that, you can notice what variables you needed (what numbers you got, computed, etc.) and what steps you need. It shows that you need something for a number from the file, a number from the user, and the number correct (at least). It also shows when you need to reset a counter and can indicate what should be in a loop
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine