Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- noc = int(input("how many coins do you want to play with? "))
- print("ok",noc,"coins it shall be")
- nof = int(input("now how many coins per flip? "))
- print("super! We shall flip", nof, "coins at a time", "that's", noc,"coins by",nof,"flips")
- go = input("type the word go and I shall tell you if the game can be done ")
- which_turn = noc - nof +1
- turns_left = noc - which_turn
- if noc / nof == 2:
- print("thats easy you can do it in 2 flips")
- elif turns_left % 2 == 0:
- print("the last element will turn heads on turn number :", which_turn)
- print("")
- print(noc, "subtract ", which_turn, "= ", turns_left)
- print("")
- print("you can")
- else:
- #if turn_left % 2 != 0:
- print("the last element will turn heads on turn number :", which_turn)
- print("")
- print(noc, "subtract ", which_turn, "= ", turns_left)
- print("")
- print(turns_left, "is odd..sorry you cant")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement