Skip to content

Commit cc572ee

Browse files
authored
Update day2.py
1 parent 5207824 commit cc572ee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

day2.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#!/usr/bin/python
1+
#!/usr/local/bin/snek
22
# cat day2input.txt | ./day2.py
33
sum = 0
44
s = input()
5-
while True:
5+
while s != '.':
66
opponent = chr(ord(s[0])+ord('X')-ord('A'))
77
if opponent == 'X':
88
correct = 'Y'
@@ -27,6 +27,4 @@
2727
print(score)
2828
sum += shape + score
2929
s = input()
30-
if s == '.':
31-
break
3230
print(sum)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy