Python Forum
I'm having trouble with my assignment for creating a math quiz
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I'm having trouble with my assignment for creating a math quiz
#5
(Nov-13-2016, 03:37 PM)thewrongnarwhal Wrote: I am confused as to how to make random number add together and have the user input the right or wrong answer. I know how to loop, but I don't know how to have all of the reports at the end for the combined stats.

Once you have picked up your two random numbers they are just numbers in variables and can be added to each other. Then the user input becomes an integer value in another variable and can be compared to the sum of these two random numbers.

For the final stats, use two counters in the loop, one that is incremented at each execution, and one that is incremented at each successful execution (you don't need a counter for errors, this is just the difference between the two counters you already have.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
RE: Creating a math quiz - by Larz60+ - Nov-13-2016, 03:30 PM
RE: Creating a math quiz - by thewrongnarwhal - Nov-13-2016, 03:37 PM
RE: Creating a math quiz - by Ofnuts - Nov-13-2016, 05:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trouble with a turtle movement assignment. JosephSondgeroth 1 1,403 Jan-27-2022, 11:56 PM
Last Post: JosephSondgeroth
  Self taught , (creating a quiz) syntax error on my array DarkAlchemyXEX 9 4,291 Jan-10-2020, 02:30 AM
Last Post: ichabod801
  Trouble with Loops in lab assignment jonstryder 6 3,390 Jul-28-2019, 06:40 PM
Last Post: ThomasL
  Trouble with "Weather Program" Assignment sarah_mb_sues 5 9,043 Aug-10-2018, 02:29 AM
Last Post: ichabod801
  Assignment help: Creating a resulting “wave” from two files AltF4ke 0 2,299 Apr-20-2018, 02:11 AM
Last Post: AltF4ke

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020