Guest User

Untitled

a guest
Feb 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. sum=0
  2. print ("Choose: \n 1-VS PC \n 2-VS Human")
  3. p=int(input())
  4. while True and p==2:
  5. print ("sum=" , sum)
  6. p1=int(input("Player 1 \n"))
  7. while (p1>10 or p1==0):
  8. print("Choose number Between 1-10")
  9. p1=int(input("Player 1 \n"))
  10. while (p1+sum>100):
  11. c=100-sum
  12. print("Choose number between (1-" , c ,")")
  13. p1=int(input("Player 1 \n"))
  14. sum=sum+p1
  15. if sum==100:
  16. print("player 1 is ther winner!!!!")
  17. break
  18. print ("sum=" , sum)
  19. p1=int(input("Player 2 \n"))
  20. while (p1>10):
  21. print("Choose number Between 1-10")
  22. p1=int(input("Player 2 \n"))
  23. while (p1+sum>100):
  24. c=100-sum
  25. print("Choose number between (1-" , c ,")")
  26. p1=int(input("Player 2 \n"))
  27. sum=sum+p1
  28. if sum==100:
  29. print("player 2 is ther winner!!!!")
  30. break
  31. while True and p==1:
  32. print ("sum=" , sum)
  33. p1=int(input("Player 1 "))
  34. while (p1>10 or p1==0):
  35. print("Choose number Between 1-10")
  36. p1=int(input("Player 1"))
  37. while (p1+sum>100):
  38. c=100-sum
  39. print("Choose number between (1-" , c ,")")
  40. p1=int(input("Player 1 "))
  41. sum=sum+p1
  42. if sum==100:
  43. print("player 1 is ther winner!!!!")
  44. break
Add Comment
Please, Sign In to add comment