Advertisement
Guest User

Untitled

a guest
Nov 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. def main():
  2. global questions
  3. questions = []
  4. global answers
  5. answers = []
  6. menu()
  7.  
  8. def addq():
  9. print("Question?")
  10. newq = input("> ")
  11. newq = str(newq)
  12. return(newq)
  13.  
  14. def adda():
  15. print("Answer?")
  16. newa = input("> ")
  17. newa = str(newa)
  18. return(newa)
  19.  
  20. def test():
  21. x = 0
  22. s = slice(x)
  23. print(questions[s])
  24. testq = input()
  25.  
  26. def menu():
  27. print("1 - Add question")
  28. print("2 - Take test")
  29. start = input()
  30. if start == "1":
  31. questions.append(addq())
  32. answers.append(adda())
  33. menu()
  34. if start == "2":
  35. if len(questions) == 0:
  36. print("No questions found...")
  37. menu()
  38. if len(questions) > 0:
  39. test()
  40.  
  41. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement