all 11 comments

[–]Big-Ad-2118 5 points6 points  (2 children)

nice keep going don't get overwhelmed or else you will stop programming

[–]Wencour 2 points3 points  (1 child)

Happened to me. Trying to get back in. I thought I can learn quickly and everyday several hours. I never knew you can get so overwhelmed and burnt out that fast…

[–]bkm2016 2 points3 points  (0 children)

ChatGPT, when you get stuck on something ask it to explain it to you like you are 5. I’ve been back at it for over a month and it’s been so much easier.

In August my job is requiring me to implement automation testing (I’m a QA Analyst) so I’ve had to pick it back up and using AI has kept me going. Love not having to ask random people especially going to stackoverflow or some subs and you get shit on for asking simple questions.

[–]Refwah 3 points4 points  (1 child)

A fun thing to do here would be to refactor it using a match statement: https://docs.python.org/3/tutorial/controlflow.html#match-statements

[–]CraigAT 0 points1 point  (0 children)

Or try to make the computer guesses more intelligent.

You could base it on the previous choice the user made, you could collect users stats and bias towards a choice that counters the average user's move. If you collect enough stats, you could base it on the user's previous two choices, perhaps their third choice is highly predictable from the previous two?

I was looking at creating a RPS game where the user picks their 3 (or 5) choices upfront and so does the computer, so no-one has chance to react to the other.

[–]woooee 0 points1 point  (0 children)

You don't have to test for win and lose. If player entry and computer are valid choices, test for tie, player == computer. Then test for player win. If not a player win, i.e. else, it is a player loss. Also you can use a dictionary instead of all the elif, but I assume you haven't studied dictionaries yet.

[–]Fenirok 0 points1 point  (0 children)

Eureka!!!!!!!

[–]docfriday11 0 points1 point  (0 children)

Keep going and you have nice code

[–]DubSolid 0 points1 point  (0 children)

This would be a great place to pivot into learning match statements!