Sep-10-2020, 02:50 PM
micseydel
Yessss.
my brother now thinks i'm a gig. for writing a home made mental arithmetic code for his kid.
quite amateur, but i'm thrilled i've reached here, i think i'll hang on thanks to your guides.
Yessss.
my brother now thinks i'm a gig. for writing a home made mental arithmetic code for his kid.
quite amateur, but i'm thrilled i've reached here, i think i'll hang on thanks to your guides.
import time import random points = 0 max_points = 0 count= 1 while True: print('Question:', (count)) print(str('--') * 10) count = count + 1 multi_value = random.randint(2, 12) input_value = random.randint(2, 12) print('what is,', multi_value, 'x', input_value, '?') correct_answer = int(multi_value * input_value) answer = input('Answer = :', ) if correct_answer > 30: points_value = 3 elif correct_answer < 30: points_value = 2 if int(answer) == int(correct_answer): time.sleep(1) print('CORRECT :',points_value, 'pts') points = points + points_value else: print('WRONG ANSWER') max_points = max_points + points_value if count == 6: print(str('--') * 10) print('\nRESULT\n') print('You got :', points,'PTS','out of:', max_points) break print(str('--') * 10)