@Vincent Ludwig XDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
@ryanschmutzler52912 жыл бұрын
I just started learning python and this really helped me understand statements and functions
@shinkansen19074 жыл бұрын
Hi Kylie, these projects really helping me a lot! You are the big champ!
@paraglide012 жыл бұрын
Thank you very much, I learned a lot. The "return (0,user,computer)" statement was an eye opener for me. I can see the potential in this.
@johnuthus4 жыл бұрын
Ah my first program (i skipped hello world)
@KylieYYing4 жыл бұрын
Good one!
@johnuthus4 жыл бұрын
@@KylieYYing wheres my program on how to talk to girls
@ItsStitchyWasTaken3 жыл бұрын
@@johnuthus you just did :D
@johnuthus3 жыл бұрын
@@ItsStitchyWasTaken then how am I single?
@ItsStitchyWasTaken3 жыл бұрын
@@johnuthus uhm 😶 you talked to the wrong women :D
@pronglebot4 жыл бұрын
lmao you said tic tac toe at 8:07, i'm only pointing this out because i was making a rock paper scissors game as well mine is much more basic compared to this one and i kept referring to it as tic tac toe instead of rock paper scissors, good video tho its nice to see other iterations of the same game
@KylieYYing4 жыл бұрын
Hahaha yeah I keep getting them mixed up even though they’re totally different
@HTWwpzIuqaObMt2 жыл бұрын
Instead of using random to select a random move, i thought of a strategy that the ai can follow to win. If we have a triangle with rock on top at bottom right the paper and at bottom left the scissors, if we lose from rock we can play the next move on the triangle which is paper and we won! Same for every other move. We can use the random lib to select a first move.
@Kaori--2 жыл бұрын
3:53 uhmm, I would like to ask about running the script, how did you do that?
@Raj_29044 жыл бұрын
import random option = ['rock', 'paper', 'sci'] n = 0 m = 0 print ("Welcome to Rock-Paper-Scissor!") while n
@Raj_29044 жыл бұрын
Can you explain what this line does? (I dont get the 'main' part) if __name__ == '__main__': play_best_of(3) # 2
@smalltamm82644 жыл бұрын
That is basically starting the function play, watching a separate youtube video for it would give the best explanation but basically "if the name of the file is main then run the play function"
@fertwvnbxcbwrtrecvbvcx3 жыл бұрын
This is (in my opinion) a concept that's too advanced for beginners. You should be fine for now without it. Come back later when you have learned more about other parts of Python. This happens to me all the time too, you'll get used to it in programming.
@notseen62403 жыл бұрын
For me it says '_name_' is not defined, anyone know how to help with that? ( I'm doing it through trinket)
@lordxauce0072 жыл бұрын
GURL....THANK YOU FOR GETTING TO THE POINT.
@aliway70372 жыл бұрын
I’m able to run the program but it isn’t acknowledging a winner, only what the computer chose. I typed everything you did, is there a broader explanation around the losses?
@Mohamedtarek-qz2zj4 жыл бұрын
Great, short and Simple tutorial, Thank you
@tmate88-j8y Жыл бұрын
Very fun video! Thanks for sharing it!
@BradleyRaines8 ай бұрын
What class did you learn this game program from Kylie ?
@bcf_3 жыл бұрын
Cool video, did you know why when I return string like you ( Return 'It\'s a tie' ) for example. The terminal shows nothing (but it works with a classical print) ?
@yorick90534 жыл бұрын
For me it says: name 'math' is not defined. Could you help me. Its on line 31.
@yorick90534 жыл бұрын
Sry, I found the solution. Just missed 'import math' on line 2. Great video and it works for me! thanks!
@mosammatmuntaha76453 жыл бұрын
I just started learning this programming language and want to practice it practically. Where can I download this version of python from?
@quantumaraa1693 жыл бұрын
Sublime text is useful. This is just python ide u can download it online.
@olivialoveroy28682 жыл бұрын
visual studio code . she is using visual studio code, it might help you and also you should follow a step by step video
@ecptavares4 жыл бұрын
at line 47 of your code you used .format(n) where does this n come from? What is it? Thank you
@BrendanMetcalfe3 жыл бұрын
Awesome project idea!
@blaqbrane81662 жыл бұрын
What if the player enters an invalid input? What happens and how do you include it in your code
@LeeMynx3 жыл бұрын
may I ask what does line 10 .format(computer) means thank you
@hbarsogay4 жыл бұрын
What will be better method to use when there are many possibilies. We cant keep adding on the condition check right? Thanks in advance ky
@KylieYYing4 жыл бұрын
Good question. I think it depends what you’re conditioning on. There are some times where you have to condition check and have a lot of “Elif”s. In other languages, there’s even this case/switch things that is for this but python just uses if/elif/else: www.w3schools.com/js/js_switch.asp But other times you might be able to map your condition to a value in a dictionary let’s say. For example: {(paper, scissors): False, (paper, rock): True, ....} Sometimes there is no super clean way of implementing things.. and there’s usually a million different ways you can implement the same logic. Sometimes it’s at the discrestion of the engineer which one is the least ugly :’)
@hbarsogay4 жыл бұрын
@@KylieYYing it is really awesome of u for taking time to responding questions. Wish u all the great success and would love to keep in touch. c = moc.liamg@liafreven.epoh Print(c[::-1])
@john-paulmatenga49433 жыл бұрын
I'm a noob and have been teaching myself python through various online resources. I attempted this project as my first solo build. I failed badly and came across this video. Is it normal to feel like I know nothing lol!
@KylieYYing3 жыл бұрын
Yep, keep practicing! It's not supposed to be easy! It's a learning process
@alucardmax48913 жыл бұрын
This code is super easy to read and your explanation is on point! thank you!!
@lolman69762 жыл бұрын
it says this have any ideas "return" can be used only within a function
@p3nx1lz913 жыл бұрын
Thanks Kylie
@lordphemstar2 жыл бұрын
You didn't add a while statement that check a wrong input from the user and returns error wrong input.. Try again.. Even at entering of the wrong letter T.. It still goes on playing the game
@hichewy67484 жыл бұрын
Sorry I'm a beginner. I don't understand the lines below. If you can tell me some terms I need to study for. Let me know, thanks very much!: line 11: return (0, user, computer) #? how can you have 3 items inside? and what does 0 mean here? line 15: return (1, user, computer) #? similiar to above. __________ line23: return True return False i assume it's same as below? return True else: return False line 33: result, user, computer = play() ?three items again? what does it mean? Also result doesn't need to be defined ?
@KylieYYing4 жыл бұрын
The return is a tuple (check out my intro data types video: kzbin.info/www/bejne/lWamimCmZbanarc ).. the 0 and 1 are numerical mappings to an outcome. Yes your second assumption is true. The 3 values get mapped to the 3 values you return.. so result would be 0 or 1 from lines 11/15 and user would be user etc
@hichewy67484 жыл бұрын
@@KylieYYing thanks very much!!
@TIMMMYYYHHH4 жыл бұрын
Omg you did this way beter than I did. Thanks for showing me there's a way beter way
@tanzimikramsheikh3 жыл бұрын
Very realistic rock, paper, scissors program!
@iliya_shorts4 жыл бұрын
hey I have a problem, it doesn´t matter what I choose I always lose. can you please help me with that?
@mdmahidurrahman61233 жыл бұрын
I got a basic from this video. Thank you so much. Best wishes From Bangladesh.
@1.17animations23 жыл бұрын
I do not know why, but this code is not working for me, there is a syntax error
@cyberninjarappa3 ай бұрын
If Fire and Water are added to this game, 1. Scissors cuts Paper 2. Scissors obstructs Water 3. Paper covers Stone 4. Paper absorbs Water 5. Stone breaks Scissors 6. Stone smothers Fire 7. Fire forges Scissors 8. Fire ignites Paper 9. Water weathers Stone 10. Water douses Fire
@LoLbeautifulsorrowx3 жыл бұрын
Why do you put (['r','p','s']) in two brackets?
@estebanortega87444 жыл бұрын
How did you run the program?
@KylieYYing4 жыл бұрын
I usually run my code in terminal
@janedoe97714 жыл бұрын
What IDE are you using?
@KylieYYing4 жыл бұрын
Virtual studio code
@sreeragr89063 жыл бұрын
how to add score in this?
@danaraujo78703 жыл бұрын
hi all. Can anyone help me? I am confused as to how the computer relates the variables in the helper function, (player and opponent) to the ones in the main function (user and computer). By this I mean, when we write, if player == r and opponent == s, how does the computer know which variable, user or computer, corresponds with either variable, player or opponent? Alternatively phrased, it seems as if it is somewhere stated or implied in the code that user = player and computer = opponent; however, I do not see where and am therefore confused with how the helper function knows what I input and what the computer input is. Thanks in advance.
@hunnyujjlani30433 жыл бұрын
Hello can u solve me a ques for me plz Write a Python script that accepts two command line parameters, subtracts the smaller number from the larger number, and then outputs the result. Example program output: C:> python subtract.py 13 28 28 - 13 = 15 Hints: • Use an if statement to determine which number is largest.
@faker_fakerplaymaker36143 жыл бұрын
thank you. that was very helpful
@ashishthakkar562 жыл бұрын
what platform is this
@hakimchulan4 жыл бұрын
This is awesome to study the design process 👍
@KylieYYing4 жыл бұрын
Thank you!
@mohammadrehan97333 жыл бұрын
How you can write the codes. How you can run the program?
@miguelmohr19904 жыл бұрын
That’s awesome content here👌🏻
@KylieYYing4 жыл бұрын
Thank you :)
@violentzengaming13474 жыл бұрын
A very very informative vedio!!!!! thanks.
@Ranzy03 жыл бұрын
Thank you so much so helpful
@gipsydanger8973 жыл бұрын
every time I run it, when I press enter it just closes the program
@fisherofmen4893 жыл бұрын
Why is it acceptable to set a function to what it returns??
@Thoko_Love Жыл бұрын
SAME THING HERE dude, its giving me an error everytime I type return
@seetsamolapo56004 жыл бұрын
Your code is so beautiful Kylie how did you get to this level?
@KylieYYing4 жыл бұрын
Practice!! Also these tutorials are “perfect” coding scenarios where I code the project ahead of time and redo it. This is the reason why tutorials aren’t my favorite type of video. If you want to see the whole thing with bugs and all, follow me on twitch @KylieYing. I’m going to try to do some live stream coding there over break.
@seetsamolapo56004 жыл бұрын
@@KylieYYing wow superb answer! I'll definitely be following you on twitch. Besides Python, ever considered maybe making mobile app development tutorials for android in Java? Your break down of concepts is awesome.
@KylieYYing4 жыл бұрын
No haha I don’t have any interest in app dev
@khusnulkhotimah454 Жыл бұрын
nice code i like it thx
@fisherofmen4893 жыл бұрын
Why dont we wanna compare strings? i'm confused
@JamieShortz3 жыл бұрын
Mikasa strikes again! :D
@hola-wm6pz3 жыл бұрын
What engine did you use?
@alucardmax48913 жыл бұрын
I believe this looks like Visual Studio code
@hola-wm6pz3 жыл бұрын
@@alucardmax4891 thank you!
@alucardmax48913 жыл бұрын
@@hola-wm6pz no problems, if you see some of her tutorials, she is also using the terminal on the mac but you can do that with windows aswell!
@hola-wm6pz3 жыл бұрын
@@alucardmax4891 thank you again
@susntsrstha4 жыл бұрын
How to open the terminal for playing game ?? I'm new
@KylieYYing4 жыл бұрын
Command line/prompt on windows, terminal on mac. Comes on your computer. See my python crash course video if you need more details
@rogancliphub3 жыл бұрын
Thanks so much, helped me with a school assignment :D
@AlokSingh-kg5wq4 жыл бұрын
this was good👌🏻👌🏻
@naesone26533 жыл бұрын
So it might be im a idiot but the code she has in the vid doesnt work for me i had to ad print commands infront of what should be returned because it just ran the game without showing any results basically.... Did i miss something ? also keep in mind i jsut did the basic game where it plays once. still great video helped me shorten my code and learn smth, thanks
@springbootguy3 жыл бұрын
give us more like this videos thnks
@OkeminiDavid-b3lКүн бұрын
Ma'am tnx a lot but I don't want this to come as a disrespect but I can barely see what your typing I'll really appreciate if u make the font bigger
@niharikaagrawal89624 жыл бұрын
awesome video thanks a trillion
@sreeragr89063 жыл бұрын
can yo please make a video on flux.........
@arnavpednekar67064 жыл бұрын
Who is watching this during quarantine
@mutwakilhigzi36863 жыл бұрын
Hi, sorry but what's on line 7
@mutwakilhigzi36863 жыл бұрын
I'm having trouble reading it
@godsowncoders82724 жыл бұрын
Y cubed..😍🔥🔥👩💻
@neouia7773 жыл бұрын
It is very smart way can you pleas make it in Tkinter, thanks
@turtles_btw29353 жыл бұрын
every time i play, i lose the game. Anyone got any help?
@neouia7773 жыл бұрын
Next time ignore the left sild of the VS and make the font more big pleas
@sharonnnn_4 жыл бұрын
Early on in the code it was user and computer. Why did it suddenly change to user and opponent and then back to user and computer?
@KylieYYing4 жыл бұрын
I defined the function using different variable names. As long as you pass in the correct reference into that variable, then it doesn't really matter. I could've even had x and y instead of user and opponent.
@TawhidShaheedАй бұрын
************* __Welcome To Rock Paper Scissors Game__************* import random class Rps: def game(self, user_input): options = ["rock", "paper", "scissor"] if user_input not in options: print("Invalid Input") exit() computer_input = random.choice(options) print(f"Computer's option: {computer_input}") if user_input == "rock" and computer_input == "scissor": print("You Won !") elif user_input == "paper" and computer_input == "rock": print("You Won !") elif user_input == "scissor" and computer_input == "paper": print("You Won !") # match tie elif user_input == "paper" and computer_input == "paper": print("Match Tie !") elif user_input == "scissor" and computer_input == "scissor": print("Match Tie !") elif user_input == "rock" and computer_input == "rock": print("Match Tie !") else: print("Computer Won !") while True: user_input = input("pick one option | rock/paper/scissor: ") obj = Rps() obj.game(user_input)
@neo599784 жыл бұрын
It keeps telling me that player_wins is not defined and yet it is
@KylieYYing4 жыл бұрын
Have you defined it before you call it? Could you paste your code?
@fisherofmen4893 жыл бұрын
line 33 doesnt make sense to me
@anti-gamer1852 жыл бұрын
Hey, very good video but this project could be less complex
@biri17104 жыл бұрын
My advice: Maybe you could do Pygame videos :)
@KylieYYing4 жыл бұрын
Maybe! I’ll look into it. Thanks for the suggestion!
@sabihissa6223 жыл бұрын
Wins_necessary = math.ceil(n/2) IndentationErrors: unexpected indent What do I do here?
@parthcodex94663 жыл бұрын
import math
@schuylerasplin37444 жыл бұрын
first time I ever used .5x speed.
@CODEFORTRESS3 жыл бұрын
8:07 That's call rock, paper and scissor not Tic-tac-toe.. 🤣🤣🤣
@laughing-out-loudhd9963 жыл бұрын
U graduated!?..
@ngimasinkiyolmo99054 жыл бұрын
your code looks so advanced😥.this is the reason i hate looking other code after completing my task.it makes me useless.
@KylieYYing4 жыл бұрын
It took me years to get here! Don’t get discouraged :) Some tips - rather than looking at my code and feeling useless, try to compare yours to mine and understand what I did why I did, and then try to clean yours up based on that! In addition, I’m also making a beginner python series that works from the bottom up. Check it out here: kzbin.info/aero/PLkWv3oO4kHnuKi032yRRYgyQ4kgaNp6gs
@ngimasinkiyolmo99054 жыл бұрын
@@KylieYYing already watched it😛
@seetsamolapo56004 жыл бұрын
Lol tell me about it. Looks so pro, so clean, so succint
@valentina23753 жыл бұрын
thank u
@abdough65492 жыл бұрын
i couldn't understand line 33
@anonymous-xr4xx4 жыл бұрын
Love from india ❣️
@notcringe25883 жыл бұрын
10am3 habibyyy
@zainabrimy52123 жыл бұрын
Thank you for all of videos yo do , and you're so cute and good for explication.
@vStarex3 жыл бұрын
Hi, I know this comment is too late but can u remake this but rock paper scissors with users and bet it like: !rps "@user" "amount credits" Winner gets the money that was bet from the user who started it. Example: Me, !rps "you" 500 I choose rock u choose paper so I win and I get 500 credits from you