Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fl = open("INPUT.TXT",'r')
- fout = open('OUTPUT.TXT', 'w')
- st1 = r.readline(0)
- st2 = r.readline(1)
- pob = "second"
- if st1 == "rock" and st2 == "rock":
- pob ="draw"
- if st1 == "rock" and st2 == "scissors":
- pob ="first"
- if st1 == "rock" and st2 == "paper":
- pob ="second"
- #ножницы
- if st1 == "scissors" and st2 == "scissors":
- pob ="draw"
- if st1 == "scissors" and st2 == "paper":
- pob ="first"
- if st1 == "scissors" and st2 == "rock":
- pob ="second"
- #бумага
- if st1 == "paper" and st2 == "paper":
- pob ="draw"
- if st1 == "paper" and st2 == "rock":
- pob ="first"
- if st1 == "paper" and st2 == "scissors":
- pob ="second"
- print(pob, file=fout)
- fout.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement