Four Group of Codes, Same Output!
Use any group of codes below to create your own learning questions. Test them out first! Copy, paste, and run them in Python. Start Python Idle, click File, drop down to New File, and paste the codes. Next, click "Run," then "Run Module." Save it with any name you like. Last, with the codes below, create more questions and organize them; replicate!
answer='Abraham Lincoln'
yranswer=''
while yranswer != answer:
print('')
yranswer=input('Who was the president during the Civl War? ')
if yranswer != answer:
print('Try again!')
print('Good Job!')
answer='Abraham Lincoln'
yranswer=''
while yranswer != answer:
print('')
yranswer=input('Who was the president during the Civl War? ')
if yranswer != answer:
print('Try again!')
else:
print('Good Job!')
answer='Abraham Lincoln'
yranswer=''
while yranswer != answer:
print('')
yranswer=input('Who was the president during the Civl War? ')
if yranswer != answer:
print('Try again!')
if yranswer == answer:
print('Good Job!')
answer='Abraham Lincoln'
yranswer=''
while yranswer != answer:
print('')
yranswer=input('Who was the president during the Civl War? ')
if yranswer != answer:
print('Try again!')
elif yranswer == answer:
print('Good Job!')