my dad reccomended this channel for coding because he said it would be good. now I'm really thankful he recommended it. thanks for the tutorials!
@ubuntunux2 жыл бұрын
Thank you very much. I found like this tutorial for my young daughter. I'll try this.
@lilarreola273 жыл бұрын
Cant wait for your next python upload! 🤩 Your python projects are so fun and i learn alot from them.
@NPStation3 жыл бұрын
Glad you like them! I just published a new video on How to code a Tic Tac Toe game in Python. Do check it out.
@lilarreola273 жыл бұрын
@@NPStation Awesome! I definitely will check it out as soon as i get a chance!
@nehanargotra32192 жыл бұрын
@@lilarreola27 Ok
@yourelol66383 жыл бұрын
Never give up and keep going!:)
@NPStation3 жыл бұрын
Thanks for supporting always ❤️
@gabemuse34302 жыл бұрын
Help! if user_input =="rock" and computer_pick == "scissors": NameError: name 'computer_pick' is not defined. Did you mean: 'computer_wins'?
@sumemafatima63943 жыл бұрын
Wow 😳😲 this is awesome 😻
@sarahparker74973 жыл бұрын
She is awesome ❤️
@gallahant2 жыл бұрын
I have an assignment that asks to code this game but i have to ensure that if the user inputs a wrong value, the program will have to tell the user "Wrong value. Please input rock, paper or scissors" (and then go to the user input line) and i don't know where to place this command. Can anyone help?
@CryptoDexter7772 жыл бұрын
great video , how to add best out of 3 feature in it. if user or computer win the game 2 time out of 3 it should end the code ? i hope you are getting my point
@NPStation2 жыл бұрын
Good idea, and thanks for the suggestion. I can enhance the code and will send you.
@littleglitch58533 жыл бұрын
I like it :)
@karmavibes71483 жыл бұрын
Awesome, but can u also give a tutorial in visual studio code
@NPStation3 жыл бұрын
You can use the same code in VS as well. Try it and let me know.
@hometv50432 жыл бұрын
For tie you could have made another elif if user choice ==computer pick it is a tie , but this is a nice simple easycode , there are lot of other videos also , this logic of creating is simple to the point
@NPStation2 жыл бұрын
Good point!
@pramodnarwade91513 жыл бұрын
Teach me Master!
@purnachandra1813 жыл бұрын
@NP Station , Pls help me out , Whenever I run the my code it shows : "computer_pick = options[random_numbers] IndexError: list index out of range" Solutions Pls
@NPStation3 жыл бұрын
Send me your code. I can help you.
@purnachandra1813 жыл бұрын
@@NPStation My code is below pls check : import random user_wins = 0 computer_wins = 0 options = ["Rock", "Paper", "Scissors"] while True: user_input = input("Type Rock/Paper/Scissors or Q for Quit : ").lower() if user_input == "Q" or "q": break print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye") if user_input not in options: continue random_numbers = random.randint(1, 3) # Rock : 1, Paper : 2, Scissors : 3 computer_pick = options[random_numbers] print("Computer picked", computer_pick + "-") if user_input == "Rock" and computer_pick == "scissors": print("you Won!!") user_wins += 1 elif user_input == "Paper" and computer_pick == "Rock": print("you Won!!") user_wins += 1 elif user_input == "Scissors" and computer_pick == "paper": print("you Won!!") user_wins += 1 else: print("You Lost") computer_wins += 1 print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye") import random user_wins: int = 0 computer_wins = 0 options = ["Rock", "Paper", "Scissors"] while True: user_input = input("Type Rock/Paper/Scissors or Q for Quit : ").lower() if user_input == "Q" or "q": break print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye") if user_input not in options: continue random_numbers = random.randint(1, 3) # Rock : 1, Paper : 2, Scissors : 3 computer_pick = options[random_numbers] print("Computer picked", computer_pick + "-") if user_input == "Rock" and computer_pick == "scissors": print("you Won!!") user_wins += 1 elif user_input == "Paper" and computer_pick == "Rock": print("you Won!!") user_wins += 1 elif user_input == "Scissors" and computer_pick == "paper": print("you Won!!") user_wins += 1 else: print("You Lost") computer_wins += 1 print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye") user_wins: int = 0 computer_wins = 0 options = ["Rock", "Paper", "Scissors"] while True: user_input = input("Type Rock/Paper/Scissors or Q for Quit : ").lower() if user_input == "Q" or "q": break print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye") if user_input not in options: continue random_numbers = random.randint(1, 3) # Rock : 1, Paper : 2, Scissors : 3 computer_pick = options[random_numbers] print("Computer picked", computer_pick + "-") if user_input == "Rock" and computer_pick == "scissors": print("you Won!!") user_wins += 1 elif user_input == "Paper" and computer_pick == "Rock": print("you Won!!") user_wins += 1 elif user_input == "Scissors" and computer_pick == "paper": print("you Won!!") user_wins += 1 else: print("You Lost") computer_wins += 1 print("You won", user_wins, "time.") print("The computer won", computer_wins, "time.") print("Bye")
@NPStation3 жыл бұрын
Hello Purna, I ran your code and your list range was out of index. You had written (1, 3) but you need to write (0, 2) since it starts on 0, not 1. Also another problem was that you put: if user_input == "Q" or "q". You need to delete the( "Q" or )since you have already added the .lower() in the previous line. I hope this helps! :)
@purnachandra1813 жыл бұрын
@@NPStationSorry to disturb again but I have made the changes and the error problem is resolved but now its showing me the wrong output like if I picked rock and computer picked scissor , then also it shows me "You lost , Cmputer won 1 time
@purnachandra1813 жыл бұрын
solutions pls genius
@Lilac_cloud12342 жыл бұрын
neha actually its not working in idle.....its showing invalid syntax.....can u make a vid on it pls....
@NPStation2 жыл бұрын
Can you share the screenshot of the error please?
@AmTheFireman3 жыл бұрын
Wow
@Kettlewhat21 Жыл бұрын
When I make my own move the conputer doesn't even respond it just says the first line again. Here is my code: import random
@NPStation Жыл бұрын
Can you send me your entire code so I can take a look?
@marshmallo90143 жыл бұрын
whenever I run it says break is not valid please I need help
@NPStation3 жыл бұрын
Please send a screenshot of your code so I can help