Sep-09-2020, 10:55 PM
thanks a million.
now
My results shows points achieved out of number of questions. but i want to show 'points achieved from supposed Maximum points'.
with different point values, i am blocked. any
?
now
My results shows points achieved out of number of questions. but i want to show 'points achieved from supposed Maximum points'.
with different point values, i am blocked. any
![Idea Idea](https://python-forum.io/images/smilies/lightbulb.png)
![Confused Confused](https://python-forum.io/images/smilies/confused.png)
import time import random 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') if count == 6: print(str('--') * 10) print('\nRESULT\n') print('You got :', points,'PTS','out of:', count,'questions') break print(str('--') * 10)