Skip to content

Instantly share code, notes, and snippets.

@jwong1109
jwong1109 / maths_quiz_v1.py
Created August 14, 2021 05:46
Maths Quiz - fully working program, combining all 6 components First version of fully working program, not yet tested for usability
""" Maths Quiz - fully working program, combining all 6 components
First version of fully working program, not yet tested for usability
Created by Joseph Wong
14/08/21
"""
import random
# Get name function
@jwong1109
jwong1109 / 06b_getting_input_division.py
Created August 12, 2021 06:54
Component 6b of Maths Quiz Ask for input to 20 questions for division, then gives feedback to the number of correct and incorrect answers. The level restarts if the attempt at the level was not 100%
""" Component 6b of Maths Quiz
Ask for input to 20 questions for division, then gives feedback to
the number of correct and incorrect answers.
The level restarts if the attempt at the level was not 100%
Created by Joseph Wong
12/08/21
"""
import random
@jwong1109
jwong1109 / 05_division_check_v3.py
Created August 11, 2021 23:17
Component 5 of Maths Quiz v3 Make the division question into a function with the random number generator from component 3 Created by Joseph Wong
""" Component 5 of Maths Quiz v3
Make the division question into a function
with the random number generator from component 3
Created by Joseph Wong
10/08/21
"""
import random
# Random number generator function
@jwong1109
jwong1109 / 06a_getting_input_multiplication.py
Created August 10, 2021 04:31
Component 6a of Maths Quiz Ask for input to 20 questions for multiplication, then gives feedback to the number of correct and incorrect answers. The level restarts if the attempt at the level was not 100%
""" Component 6a of Maths Quiz
Ask for input to 20 questions for multiplication, then gives feedback to
the number of correct and incorrect answers.
The level restarts if the attempt at the level was not 100%
Created by Joseph Wong
10/08/21
"""
import random
@jwong1109
jwong1109 / 05_division_check_v3.py
Created August 10, 2021 03:19
Component 5 of Maths Quiz v3 Make the division question into a function with the random number generator from component 3
""" Component 5 of Maths Quiz v3
Make the division question into a function
with the random number generator from component 3
Created by Joseph Wong
10/08/21
"""
import random
# Random number generator function
@jwong1109
jwong1109 / 04_multiplication_check_v3.py
Created August 10, 2021 03:14
Component 4 of Maths Quiz v3 Make the multiplication question into a function with the random number generator from component 3
""" Component 4 of Maths Quiz v3
Make the multiplication question into a function
with the random number generator from component 3
Created by Joseph Wong
10/08/21
"""
import random
# Random number generator function
@jwong1109
jwong1109 / 03_random_number_generator_v3.py
Created August 10, 2021 03:12
Component 3 of Maths Quiz v3 Make random number generator into a function Created by Joseph Wong
""" Component 3 of Maths Quiz v3
Make random number generator into a function
Created by Joseph Wong
10/08/21
"""
import random
# Random number generator function
@jwong1109
jwong1109 / 05_division_check_v2.py
Created August 8, 2021 22:08
Component 5 of Maths Quiz v2 Have the two random number multiply together to give a number to divide Divide by number 1 to ask for number 2 Check if the user's answer is correct - include integer check
""" Component 5 of Maths Quiz v2
Have the two random number multiply together to give a number to divide
Divide by number 1 to ask for number 2
Check if the user's answer is correct - include integer check
Created by Joseph Wong
9/08/21
"""
# Integer Checker
@jwong1109
jwong1109 / 05_division_check_v1.py
Created August 8, 2021 21:48
Check that a divisible number will give an answer from 1 to 12. Check also that it gives the right answer and checks for the users’ input.
""" Component 5 of Maths Quiz v1
Have the two random number multiply together to give a number to divide
Divide by number 1 to ask for number 2
Check if the user's answer is correct
Created by Joseph Wong
9/08/21
"""
# From Component 3
import random
@jwong1109
jwong1109 / 04_multiplication_check_v2.py
Created August 6, 2021 04:16
Component 4 of Maths Quiz v2 Have the two random number multiply together to check if the user's answer is correct - include integer check
""" Component 4 of Maths Quiz v2
Have the two random number multiply together
to check if the user's answer is correct - include integer check
Created by Joseph Wong
6/08/21
"""
# Integer Checker