Buggy Python Code Fix: Multiplication Quiz
Fixed Python
import random
a = random.randint(1,12) b = random.randint(1,12)
for i in range(10): question = 'What is '+str(a)+' x '+str(b)+'? ' answer = int(input(question)) if answer == a*b: print('Well done!') else: print('No.')
原文地址: https://www.cveoy.top/t/topic/mlNf 著作权归作者所有。请勿转载和采集!