+ 1
I Enjoy Repeating My Self... [help condense code]
This code seems very wet but I'm not sure how to condense it. Seems like a lot of the code can be reused or discluded. What do you guys think? https://code.sololearn.com/ca6r9lXUP2au/?ref=app
2 Respostas
+ 2
Here is my revision. I made use of the indexing of the words in your list (right beats left) for the condition and a dictionary for the winner’s text like Seb TheS suggested.
https://code.sololearn.com/crDIOryVC5jT/?ref=app
+ 2
I think the game could have a dictionary:
{"Rock", "Scissors", "Paper"}
with text they will do if they win and only winner's text would be printed.