{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Prog5.py - #display the header information print"CSC 122-W1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#display the header information print("""CSC 122-W1 - Program #5 By Alex Peters Due: Mar. 22, 2017 """) x=' '; #Load random module import random #showResult function accepts both the user's answer, and the actual calculated #answer, determines if they are the same, and then tells the user if they were #correct or incorrect. def showResult(ua, a): if (ua == a): print ("Correct... Good Job!") else: print ("Incorrect... the correct answer is: ", a) #getAnswer function accepts the two randomly generated numbers and adds them #togetherm then returns that value
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}