Anyone good with Python and Pseudo Code?
I was hoping that someone could help me with some python work I was doing. I need to translate this piece of Python code to Pseudo Code but I really can't get my head around Pseudo code so can someone help me out?
This is the code:
Code
import random
operator = ["+", "-", "*"]
correct = 0
questions = 0
name = input("What's your name? ")
print ("Today,", name, "you will be doing 10 questions to test your basic arithmetic skills.")
while questions < 10:
no1 = random.randint (1,10)
no2 = random.randint (1,10)
ranoperator = random.choice(operator)
quest = str(no1) + str(ranoperator) + str(no2)
questions = questions + 1
print ("What is...", quest, "?")
while True:
try:
answer = int(input("Ans: "))
except ValueError:
print ("That's not a number! You're so silly. Try again!")
continue
break
if answer == eval(quest):
print ("Correct")
correct = correct + 1
else:
print ("Incorrect")
print (name, "your overall score is", correct, "out of 10!")
if correct < 5:
print ("Unlucky", name,"you'll do better next time.")
else:
print ("Congratulations", name,"You did great!")
Thanks :P