Facebook
From Areesa Shezad, 2 Years ago, written in Plain Text.
This paste is a reply to Assessment code from Areesa Shezad - view diff
Embed
Download Paste or View Raw
Hits: 90
  1. #Areesa Shezad
  2. import random
  3. print("Welcome to brain training")
  4. print("You will be asked 10 questions")
  5. name=input("Enter your name:")
  6. nick=input("What is your nickname?")
  7. print("Ok",name)
  8. print("But i will call you",nick)
  9. num1 = random.randint(1,5)
  10. num2 = random.randint(1,10)
  11. question=input(num1 and num2)
  12. answer=input("What is your answer?")
  13. computerAnswer= num1+num2
  14. answer=int(answer)
  15.  if answer==computerAnswer:
  16.    print("correct")
  17.  else:
  18.    print("incorrect")
  19. questionChoice=2
  20.  if questionChoice==1
  21.    print("add" num1 and num2)
  22. elif questionChoice==2
  23.    print("subtract" num1 and num2)
  24. else questionChoice==3
  25.    print("multiply"num1 and num2)
  26. computerAnswer= num1 + num2
  27. score=0
  28. if score == computerAnswer then
  29.     print("correct",score+1)
  30. questionNumber=1