Sep-09-2020, 02:27 AM
I am a complete novice programing, and just started laerning python.
how can i cumulate points in the below program:
how can i cumulate points in the below program:
import time import random while True : multi_value = random.randint(1, 5) input_value = random.randint(2, 12) multi_value_select = int(multi_value) input_value_select = int(input_value) print('what is,', multi_value_select, 'x' , input_value_select,'?','....') correct_answer= int(multi_value_select * input_value_select) answer=input('Answer = :', ) points= 0 if int(answer) == int(correct_answer): time.sleep(1) print('CORRECT :', int(points)+ 2,'pts') else: time.sleep(1) print('WRONG ANSWER')