Python Project 1 | Rock Paper Scissors Game in Python | Python for Beginners

  Рет қаралды 94,091

Jenny's Lectures CS IT

Jenny's Lectures CS IT

Жыл бұрын

Coding Rock, Paper Scissors Game in Python. This tutorial will teach you how to develop the rock, paper & scissors game using Python programming. This is our First Project in this Python Tutorial Series
Best Python Tutorials for Beginners: • Python - Basic to Advance
*********************************************
Connect & Contact Me:
My Second Channel Link: bit.ly/354n7C7
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/profile/Jayanti...
Instagram: / jayantikhatrilamba
Twitter: / khatrijenny
*******************************************
More Playlists:
Programming in C Tutorials: • Programming in C
C++ Tutorials for beginners: • Lec 1: How to Install ...
Placement Series: • Placements Series
Data Structures and Algorithms: https: • Data Structures and Al...
Design and Analysis of Algorithms(DAA): • Design and Analysis of...
Dynamic Programming: • Dynamic Programming
Operating Systems tutorials: // • Operating Systems
DBMS Tutorials: • DBMS (Database Managem...
#coding #pythonforbeginners #python #jennyslectures #pythonprogramming

Пікірлер: 161
@theperspective393
@theperspective393 Жыл бұрын
Its great time to see such brain trainer videos in programming,have great time mam, A big❤❤ Thank you for you for making easy such python concept.
@maifeeulasad
@maifeeulasad Жыл бұрын
I have completed my graduation, now I'm a full-time software engineer. But everytime I get a notification that jenny ma'am has uploaded a video I'm like, it's time to learn a bit more and melt again. *Love you Jenny ma'am* 👉🥺👈
@Vaibhavvarshith
@Vaibhavvarshith Ай бұрын
Which college bro
@chandrasekar.r5311
@chandrasekar.r5311 Жыл бұрын
Kindly upload all topics in python asap mam. Your teaching is really helpful for python beginners....😊 Thanks in advance....
@gurulakshmi._
@gurulakshmi._ Жыл бұрын
Please continue this series without any breaks..
@manfredmasiko4444
@manfredmasiko4444 Жыл бұрын
It has been a long time! But the great thing is you are eventually back🙏🙏😀
@chikkiworld
@chikkiworld Жыл бұрын
Creating that rock, paper, scissor images was amazing mam❤
@obentheodore9037
@obentheodore9037 3 ай бұрын
Just subscribed. Pls upload everything. Love your work and the way you teach.
@tuhinghosh9737
@tuhinghosh9737 Жыл бұрын
Mam please continue the c++ course also ❤️
@midnightphantom4787
@midnightphantom4787 22 күн бұрын
You can specifically look for the combination in which user wins and put the computer wins in else it works fine for me and is turbo fast
@upendra0189
@upendra0189 Жыл бұрын
Always love for Jenny ma'am explanations ❤
@thetempest9469
@thetempest9469 Жыл бұрын
Bete
@venkateswarlugoud4564
@venkateswarlugoud4564 Жыл бұрын
Excellent mam❤❤😊
@KrishnaReddy-vz4cn
@KrishnaReddy-vz4cn Жыл бұрын
Very good explanation
@shadabshaikh2305
@shadabshaikh2305 Жыл бұрын
Thank you and best video
@Rishav-tk5wc
@Rishav-tk5wc 2 ай бұрын
your teaching skills are amazing mam 💓💓💓💓
@randouser403
@randouser403 Жыл бұрын
Thank you ma'am, these games are really cool!
@mr_affan15
@mr_affan15 Жыл бұрын
Mam plzz upload fast we are always eagerly waiting for your videos which helps a lot to learn
@user-rn8ql9yt9b
@user-rn8ql9yt9b 6 ай бұрын
thank you soo much ma'am, once upon i used to hate coding because i never understood after i have taken many other courses on python but i was unable to understand and write code on my own. But after watching your lectures i can write all the exercise code and even think alternate methods without seeing u solutions. now i feel confident about coding. i have written this code also without seeing import random print('lets play rock paper scissors!!! ROCK=0 PAPER=1 SCISSORS=2') print() u=int(input('rock paper scissors enter your input ')) c=random.randint(0,2) print(f'computer choose {c}') if u > 2 or u < 0: print('correct input toh de tuu har gaya') elif u == c: print('Bhai DRAW hogaya fir se khel') elif u == 0 and c == 2: print('YOU WIN!!!!!') elif u == 2 and c == 0: print('YOU LOOSE!!!!!') elif c > u: print('YOU LOOSE!!!!!!') elif u > c: print('YOU WIN!!!!!')
@Yourcodingfriendsaruk
@Yourcodingfriendsaruk 7 ай бұрын
thank you so much for you help mam i am continuously watchng your all series there many students depends on so pls support us all the time mam dont give up mam
@asif_chouhanproduction415
@asif_chouhanproduction415 Жыл бұрын
Respected madam. Keep doing good
@gamingwithsane762
@gamingwithsane762 6 ай бұрын
Thankyou so much mam it helped me a lot currently I'm not that capable of giving anything to you but mam one day i will definitely come back to thank you monetarily❤
@sruthy3319
@sruthy3319 Жыл бұрын
Hai mam an excellent teaching. Please upload a video about Sudoku solver using backtracking technique
@nirvikdutta3407
@nirvikdutta3407 Жыл бұрын
import random print("1.Rock 2.Paper 3.Scissor") y = int(input("Enter option: ")) c = random.randint(4,6) if y==1 : if c==5: print("You loose computer has chosen paper") elif c==6: print("You win computer has chosen scissor") else: print("Play again") elif y==2 : if c==4: print("you win computer has chosen rock") elif c==6: print("you loose computer has chosen scissor") else: print("Play again") elif y==3: if c==4: print("you loose computer has chosen rock") elif c==5: print("you win computer has chosen paper") else: print("Play again") else : print("Choose correct option")
@midnightphantom4787
@midnightphantom4787 22 күн бұрын
You could have used a list and put rock paper and scissors at specified indexes 4,5,6 which could have reduced code lines
@K-bd3oh1gz9e
@K-bd3oh1gz9e 14 күн бұрын
​@@midnightphantom4787can you write your code?
@sucharithapatnana2946
@sucharithapatnana2946 Жыл бұрын
Thank you mam please don't stop this series
@manojms
@manojms 5 ай бұрын
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
@KundaMohammed-hb4ro
@KundaMohammed-hb4ro Жыл бұрын
So happy that you are back mam.
@Rajesh.kunchapu
@Rajesh.kunchapu Жыл бұрын
Thank you so much madam ☺️
@Mythri333
@Mythri333 11 ай бұрын
Thank you ☺️
@zoakayasser3811
@zoakayasser3811 Жыл бұрын
Can you please do more of these project tutorials
@user-rq1ss5jm5x
@user-rq1ss5jm5x Жыл бұрын
Nice job💯👍 please make a video on python syntax
@navletleogaming7862
@navletleogaming7862 Жыл бұрын
Mam take a lecture about Loops because it's difficult topic, everyone confused that so I think u may explain it very clearly.
@JennyslecturesCSIT
@JennyslecturesCSIT Жыл бұрын
Next lecture would be about loops
@karnalavakumarreddy3915
@karnalavakumarreddy3915 Жыл бұрын
​@@JennyslecturesCSIT0:02 0:02
@vkalyan8303
@vkalyan8303 Жыл бұрын
Looking gorgeous 😍
@botnet7456
@botnet7456 Жыл бұрын
i lubbbbbbb uuuuuu maam.. u r getting prettier day by day 💗 💓 💕 💖 💛 ❤️ 💗
@stephenoluwafemiherbert
@stephenoluwafemiherbert Жыл бұрын
Thanks
@RaghavsInfoRMCreation
@RaghavsInfoRMCreation Жыл бұрын
nice
@venkateswarlugoud4564
@venkateswarlugoud4564 Жыл бұрын
Tq mam🎉🎉🎉
@imrandogar2318
@imrandogar2318 Жыл бұрын
@aravindjaladhi235
@aravindjaladhi235 Жыл бұрын
Thank u for continuing python tutorial classes 😂😂
@TYashwanthBEC
@TYashwanthBEC Жыл бұрын
Can't we change the condition as if computer_choice - user_choice == 1 print("you lose")
@learnConfidently242
@learnConfidently242 Жыл бұрын
MasAllah
@kenshampton1321
@kenshampton1321 10 ай бұрын
rock = '🪨' paper = "📃" scissors = '✂' gameIcons = [rock, paper, scissors] import random choice = [0, 1, 2] compChoice = random.choice(choice) userChoice = int(input('What is your choice 0-rock,1-paper & 2- Scissors? ')) if userChoice < 0 or userChoice > 2: userChoice = int(input('Please make a valid choice.0-rock,1-paper & 2- Scissors: ')) # To improve use loop function? if compChoice == userChoice: print('You have a draw. Click to play again.') elif userChoice == 0 and compChoice == 2: print('You win') elif compChoice == 0 and userChoice == 2: print('You lose!') elif compChoice > userChoice: print('You lose. Click enter to play another round') else: print('You win.') print(f'Computer chooses , {gameIcons[compChoice]}') print(f'You choose ,{gameIcons[userChoice]}')
@kairakalyan1939
@kairakalyan1939 Жыл бұрын
##My God Iam exausted with her cuteness...❤❤❤
@vinaymalik5437
@vinaymalik5437 Жыл бұрын
Mam please upload lectures on java and java using DSA
@avinashsonu2424
@avinashsonu2424 Жыл бұрын
when will you start java mam
@balrajadira3612
@balrajadira3612 5 ай бұрын
With in 5 days
@jerrygeorgejoshi8009
@jerrygeorgejoshi8009 29 күн бұрын
@@balrajadira3612 😂🤣🤣
@saiyanwarrior3047
@saiyanwarrior3047 Жыл бұрын
First viewer and i wanna say please make some big broject we dont want pathar aur kechi aur kagaj
@abhishekmatti2997
@abhishekmatti2997 Жыл бұрын
Tq mam
@SwadinSahoo-ih6jg
@SwadinSahoo-ih6jg 4 ай бұрын
00:01
@abhaykumartripathi2675
@abhaykumartripathi2675 Жыл бұрын
Please make a video on Python Panda and regular expression with pandas
@vijaykommula-5598
@vijaykommula-5598 8 ай бұрын
This is also fine think so 🤔🤔 import random user_choice = int(input('enter the choice : ')) computer_choice = random.randint(0,2) print(computer_choice) if user_choice>-1 and user_choice computer_choice: print('u wins') elif user_choice
@wrapfreekzz
@wrapfreekzz Жыл бұрын
🧚‍♂️
@gauravpratapsingh8526
@gauravpratapsingh8526 Жыл бұрын
mam please continue c++ series
@MANOJGACHHIPURA
@MANOJGACHHIPURA Жыл бұрын
Mam I am not understand different between - Data + Database + Edp + DBMS + SQL + MS access ? I Need your help
@dhanalakshmi7619
@dhanalakshmi7619 Жыл бұрын
Please complete DAA series mam
@jeekakrishna
@jeekakrishna Жыл бұрын
i have made this game on python framework called streamlit.
@tanishachaudhary3154
@tanishachaudhary3154 Жыл бұрын
Ma'am pls upload the full course
@prabhas2186
@prabhas2186 Жыл бұрын
First view
@lyr4389
@lyr4389 Жыл бұрын
Lecture nhi main toh aapko dekhne aata hu beautiful mam
@MARUTHU_1801
@MARUTHU_1801 13 күн бұрын
where we can download images you have used like rock,scissor and paper
@denentertainer2171
@denentertainer2171 Жыл бұрын
Mam can i change a string into a command like if I enter the string "insert 1 2" Then it will insert 1 at the index 2 in a list
@jjjmemes420
@jjjmemes420 2 ай бұрын
No bro we can't. It can inserted only in a list😊
@saisunil5893
@saisunil5893 Жыл бұрын
Cuteness overloaded❤❤
@deepakvirupaksha
@deepakvirupaksha Жыл бұрын
mam explain mean,median, mode please
@yusufklcsln
@yusufklcsln 9 ай бұрын
how could we access that rock paper scissors signs?
@MARUTHU_1801
@MARUTHU_1801 13 күн бұрын
All is well in the below coding.but only one am getting struck.whenever i feeding user input as more than 2,am getting user wins.but that is not am supposed to get.rather than that i should get "invalid input" import random as r user_input = int(input("enter anyone of following numbers(0,1,2): ")) comp_input = int(r.randint(0,2)) if user_input == comp_input : print(user_input,comp_input) print("game gets draw") elif comp_input > user_input : print(user_input,comp_input) print("computer wins the game") elif user_input > comp_input : print(user_input,comp_input) print("user wins") elif user_input == 0 and comp_input == 2 : print(user_input,comp_input) print("user wins") elif comp_input == 0 and user_input == 2 : print(user_input,comp_input) print("computer wins") else: print(user_input,comp_input) print("invaid input") print("game ends!!!")
@sangeethsooriyacr666
@sangeethsooriyacr666 Жыл бұрын
Mam one question from a young boy? If i study programming language selfstudy, can i be a programmer? Is it possible??
@Soou2023
@Soou2023 9 ай бұрын
Mam in this if elif ladder can't we put else at the end of the program
@Soou2023
@Soou2023 9 ай бұрын
It's showing error if I put else conditon in last like If: elif: elif: elif: elif: else:
@mr.villan5061
@mr.villan5061 9 ай бұрын
Mam can you give that image to insert in program
@user-tv9uj5hb8h
@user-tv9uj5hb8h 6 ай бұрын
import random u=int(input("enter the choice, 0-rock, 1-paper,2-scissor:")) a=random.randint(0,2) print(a) if u==a: print("A draw") elif u>a and u-a==1: print("You won") elif u>a and u-a==2: print("You lost") elif u
@anshika3466
@anshika3466 6 ай бұрын
This code isn't functioning
@praveenKumar-zo5dl
@praveenKumar-zo5dl 11 ай бұрын
Mam ap itne sunder ho k rules logic kch yaad hi ni rehta apko dekh ker 😍
@jahnavikalluru4681
@jahnavikalluru4681 Жыл бұрын
hlo mam..... import random user_choice=input("enter your choice(rock/paper/scissor): ") game=['rock','paper','scissor'] #user_choice=random.choice(game) #print('user choice:',user_choice) computer_choice=random.choice(game) print('computer choice:',computer_choice) if user_choice==computer_choice: print("DRAW") elif user_choice=='rock' and computer_choice=='paper': print('computer won the game.') elif user_choice=='rock' and computer_choice=='scissor': print('user won the game.') elif user_choice=='paper' and computer_choice=='rock': print('user won the game.') elif user_choice=='paper' and computer_choice=='scissor': print('computer won the game.') elif user_choice=='scissor' and computer_choice=='rock': print('computer won the game.') else: print('user won the game.') This is how i wrote the code......and i hope we can write like this....Am i correct mam?
@JabeenTaj46
@JabeenTaj46 8 ай бұрын
import random user_choice = (input('Enter 0 for rock and 1 for paper and 2 for scissor: ')) print('user_choice is '+ user_choice) user_choice = int(user_choice) computer_choice = random.randint(0,2) print('computer_choice is '+str(computer_choice)) if user_choice computer_choice: print('user wins') elif user_choice == computer_choice: print('Drop') else: print('invalid choice')
@G.keerthi544
@G.keerthi544 5 ай бұрын
can anyone tell me i should keep this project on my resume
@bhiks
@bhiks Жыл бұрын
Mam, I have completed c, Now, which language do I have to learn? . . After that which? Then which?
@randomfactz332
@randomfactz332 Жыл бұрын
c++ pyhton html css javscript
@bhiks
@bhiks Жыл бұрын
@@randomfactz332 then what will be my job
@nandinidubey8968
@nandinidubey8968 22 күн бұрын
import random choose = int(input("enter 0 for rock ,1 for paper and 2 for scissor")) x=random.randrange(0,2) print(x) if(choose == x): print("draw") elif(choose == 0 and x == 1 or choose == 1 and x == 0): print("Paper win") elif(choose == 0 and x == 2 or choose == 2 and x == 0): print("Rock win") elif(choose == 2 and x == 1 or choose == 1 and x == 2): print("Scissor win") else: print("wrong input")
@ArunKumar-lv5oe
@ArunKumar-lv5oe 2 ай бұрын
Based on this is there any chance to create program on dragon vs tiger game
@midnightphantom4787
@midnightphantom4787 22 күн бұрын
Can you brief me with the game?
@satendrachauhan5120
@satendrachauhan5120 Жыл бұрын
Mam you are looking so cute 😂😂
@amithkulkarni4785
@amithkulkarni4785 6 ай бұрын
cs = random.choice(cs_choice) if user == 'rock' and cs == 'scissor' or user == 'scissor' and cs == 'paper' or user == 'paper' and cs == 'rock': print('user wins') elif user == cs: print("next try") else: print('cs win')
@nithinvasamsetti
@nithinvasamsetti Ай бұрын
import random print("0=rock 1=paper 2=scissors") userinput=int(input("enter a number between 0 to 2: ")) computerinput=random.randint(0,2) print(computerinput) if userinput==0 or userinput==1 or userinput==2: if (userinput==0 and computerinput==2)or(userinput==1 and computerinput==0)or(userinput==2 and computerinput==1): print("user wins") elif (userinput==0 and computerinput==1)or(userinput==2 and computerinput==0)or(userinput==1 and computerinput==2): print("computer wins") elif userinput==computerinput: print("it is a tie") else: print("the input you entered is invalid, PLEASE ENTER VALUE BETWEEN 0 AND 2")
@venkat7376
@venkat7376 Жыл бұрын
Which Python software used mam
@mosessakala6686
@mosessakala6686 Жыл бұрын
pycharm
@rakeshmishra7215
@rakeshmishra7215 Жыл бұрын
mam is chat gpt repalce devloper.
@viswabhaiyt2877
@viswabhaiyt2877 Жыл бұрын
Your big big eyes are knocking me down ..👎👎 ❤JENNY❤ It's for you Jenny mam👉❤
@snehakumari4331
@snehakumari4331 5 ай бұрын
import random option=['Rock','Paper','Scissor'] print(option) user=int(input("Enter your Choice: ")) comp=random.randint(1,3) print(option[user-1],"is User's Choice") print(option[comp-1],"is Computer's Choice") if user==comp: print("It's draw") elif user==1 and comp==3: print("You Win") elif user==3 and comp==1: print("You Lose") elif user>comp: print("You Win") elif comp>user: print("You Lose") else: print("Please enter valid option")
@Fea_Tutorials
@Fea_Tutorials 9 ай бұрын
import random list=["rock","paper","scissor"] user=int(input("what is your choice (Rock-0,Paper-1,scissor-2):")) if (0 cpu): print("You win") else: print("You entered wrong option")
@devSackey
@devSackey 8 ай бұрын
import random computer_choce = random.randint(0, 2) user_choice = int(input("Enter any value from 0 to 2: ")) print(f"User's choice is {user_choice} Computer's choice is {computer_choce}") if not (0 computer_choce: print("Congratulations🎉, You won")
@arunkarthikeyans6921
@arunkarthikeyans6921 2 ай бұрын
import random as ran option=['R','P','S'] computer_choice=ran.choice(option) user_choice=input("Enter your choice(R/P/S):") final_list=[computer_choice,user_choice] print(f"Computer Choice:{computer_choice}") #list of winning possibility of user winning_set=[['P','S'],['S','R'],['R','P']] if final_list in winning_set: print("User Won!") elif [final_list[1],final_list[0]] in winning_set: print("Computer Won") else: print("Draw")
@saranyasubramanian8953
@saranyasubramanian8953 10 ай бұрын
import random # 0 for stone,1 for paper,2 for scissor #user_value = a a = int(input("enter your option(0/1/2):")) #computer_value = b b = int(random.randint(0,2)) print(f"user value is {a} and computer value is {b}") #stone win against scissor #paper win against stone #scissor win against paper if a==b: print("draw") elif a==0 and b==1: print("you lose") elif a==0 and b==2: print("you win") elif a==1 and b==0: print("you win") elif a==1 and b==2: print("you lose") elif a==2 and b==0: print("you lose") elif a==2 and b==1: print("you win") else: print("please enter valid number.")
@agnivabera5496
@agnivabera5496 Жыл бұрын
I do it like that.. is it okay ma'am ?
@AquaGamer777
@AquaGamer777 8 ай бұрын
import random c = ['rock','paper','scissor'] a = input('enter r/p/s:') b = random.choice(c) if a == 'r' and b == 'scissor': print('you win') elif a == 's' and b == 'paper': print('you win') elif a == 'p' and b == 'rock': print('you win') elif a == 'r' and b == 'paper': print('you lose') elif a == 's' and b == 'rock': print('you lose') elif a == 'p' and b == 'scissor': print('you lose') elif a == 'r' and b == 'rock': print('draw') elif a == 's' and b == 'scissor': print('draw') elif a == 'p' and b == 'paper': print('draw') else: print('not correct input') print(b)
@knightjaat9208
@knightjaat9208 10 ай бұрын
import random select=int(input("CHOOSE 1 FOR STONE CHOOSE 2 FOR PAPER CHOOSE 3 FOR SCISSORS")) a=random.randint(1,3) print(a) if(select==a): print('TIE') elif select==1 and a==2: print('I WON') elif(select==1 and a==3): print('YOU WON') elif(select==2 and a==1): print('YOU WON') elif(select==2 and a==3): print('I WON') elif(select==3 and a==1): print('I WON') elif(select==3 and a==2): print('YOU WON') else: ('PLEASE TYPE THE CORRECT INPUT') mam is this correct
@MS.17
@MS.17 8 ай бұрын
import random user_choice = int(input("Enter your choice (0 for Rock, 1 for Paper, 2 for Scissors): ")) computer_choice = random.randint(0, 2) print("Computer chose:", computer_choice) if user_choice == computer_choice: print("It's a draw") elif (user_choice == 0 and computer_choice == 2) or (user_choice == 1 and computer_choice == 0) or (user_choice == 2 and computer_choice == 1): print("You win!") else: print("You lose")
@johngiddu6625
@johngiddu6625 Жыл бұрын
import random user = int(input("Enter 0 for rock Enter 1 for paper Enter 2 for scissors")) computer = random.randint(0,2) if user == computer: print("It's draw") elif user==0 and computer==1 : print("computer choosed paper") print("computer wins") elif user==0 and computer==2 : print("computer choosed scissors") print("you win") elif user==1 and computer==0 : print("computer choosed rock") print("you win") elif user==1 and computer==2 : print("computer choosed scissors") print("computer wins") elif user==2 and computer==0 : print("computer choosed rock") print("computer wins") elif user==2 and computer==1 : print("computer choosed paper") print("you win") else : print("you entered wrong input computer wins") made it in first attempt
@vickykumar-br6po
@vickykumar-br6po 10 ай бұрын
# Rock paper scissors import random print("Rock paper scissors game Do you want to play the game ? ") press = input("press y for yes and n for no ") if press=='y' or press=='Y': choice = int(input("press 0 for rock press 1 paper press 2 scissors ")) generate = random.randint(0,2) if choice==0: print("you have choose Rock.") if choice==1: print("you have choose Paper.") if choice==2: print("you have choose scissors") if generate==0: print("computer have choose Rock.") if generate==1: print("computer have choose Paper.") if generate==2: print("computer have choose scissors") if generate==choice: print("match drawn.") elif generate==0 and choice==1: print("you won.") elif generate==0 and choice==2: print("yoy lose.") elif generate==1 and choice==1: print("you lose.") elif generate==1 and choice==2: print("you won.") elif generate==2 and choice==0: print("you won.") elif generate==2 and choice==1: print("you lose") elif press=='n' or press=='N': print("you do not want to play , thank you") else: print("wrong input")
@ABMOVIES-telugu
@ABMOVIES-telugu 8 ай бұрын
import random print('0 for rock 1 for paper 2 for scissor') choice = ['rock','paper','scissor'] user = int(input("Enter your choice : ")) computer = random.randint(0,2) if user == 0 or user == 1 or user == 2: if (user < computer ) or (user == 2 and computer == 0): print(f'Computer won. You chosen {choice[user]} and computer chosen {choice[computer]}') elif (computer < user) or (computer == 0 and user == 2): print(f'You won. You chosen {choice[user]} and computer chosen {choice[computer]}') else: print(f" It's draw. you and computer chosen {choice[user]}") else: print('Please enter valid input.')
@makupetrical003
@makupetrical003 2 ай бұрын
#for 3 number inputs e.g 121 import random user_choice = input("What do you choose? Type 0 for rock, 1 for paper, 2 for sicissor: ") computer_choice = random.randint(0,2) computer_choices = str(computer_choice) print(user_choice) print(computer_choice) user = int(user_choice[0]) computer = int(computer_choices[0]) choosen_user = user_choice[user-1] choosen_computer = computer_choices[computer_choice-1] print(choosen_user) print(choosen_computer) if choosen_user == choosen_computer: print("draw") elif choosen_user == 0 and choosen_computer == 2: print('user win') elif choosen_user == 2 and choosen_computer == 0: print("computer win") elif choosen_user > choosen_computer: print("user win") elif choosen_user < choosen_computer: print("computer win") else: print("enter correct input")
@muhammadshaheerkhan7212
@muhammadshaheerkhan7212 6 ай бұрын
import random user_input=input("please enter your choice (Rock/Paper/scissor 0/1/2)") user_input=int(user_input) computer_choice=(0,1,2) computer_choice=random.choice(computer_choice) if user_input>=3: print("please enter correct choice") elif computer_choice==0: print("computer's choice is rock") elif computer_choice==1: print("computer's choice is paper") elif computer_choice==2: print("computer's choice is scissors") if user_input>=3: print("game over") elif user_input==computer_choice: print("Draw") elif user_input==0 and computer_choice==2: print("You won") elif computer_choice==0 and user_input==2: print("Computer won") elif user_input>=computer_choice: print("You won") elif computer_choice>=user_input: print("computer won")
@makupetrical003
@makupetrical003 2 ай бұрын
import random user_choice = int(input("What do you choose? Type 0 for rock, 1 for paper,2 for scissor: ")) computer_choice = int(random.randint(0,2)) print(user_choice) print(computer_choice) if user_choice >=3 or user_choice computer_choice: print("user win") else: print("computer win")
@v4ibhavxs
@v4ibhavxs Күн бұрын
import random user_choice=int(input("enter your choice: type 0 for rock, 1 for paper, 2 sissors")) if user_choice >= 3 or user_choice < 0: print("invalid number") else: computer_choice=random.randint(0,2) print("computer chose") print(computer_choice) if computer_choice == user_choice: print("its a draw") elif computer_choice == 0 and user_choice == 2: print("you loose") elif computer_choice == 2 and user_choice== 0: print("you win") elif computer_choice == 0 and user_choice == 1: print("you win") elif computer_choice == 1 and user_choice == 0: print("you loose") elif computer_choice == 1 and user_choice == 2: print("you win") elif computer_choice == 2 and user_choice == 1: print("you loose")
@mmanoj3037
@mmanoj3037 Жыл бұрын
import random rock=0 paper=1 scissor=2 user_choice = int(input("enter your choice")) computer_choice = random.randint(0,2) print(f"user_choice={user_choice} comp_choice={computer_choice} ") if(user_choice==rock and computer_choice == rock): print("match draw") elif(user_choice==paper and computer_choice == paper): print("match draw") elif(user_choice==scissor and computer_choice == scissor): print("match draw") elif(user_choice==rock and computer_choice==scissor ): print("you win") elif(user_choice==scissor and computer_choice==rock): print("comp wins") elif(user_choice>computer_choice): print("user win") elif(user_choice
@user-ev5bm7yx8i
@user-ev5bm7yx8i 11 ай бұрын
user_input = int(input("Enter your choice: ")) system_input = random.randrange(0,3) print(f"System input: {system_input}") if user_input < 0 or user_input > 2: print("YOUR CHOICE IS INVALID CHOICE. PLEASE TRY AGAIN!") elif user_input == system_input: print("MATCH IS DRAW") elif user_input == 0 and system_input == 2: print("you won the game") elif user_input == 2 and system_input == 0: print("you lost the game") elif user_input < system_input: print("you lost the game") else: print("you won") IF YOU GUYS FOUND ANY MISTAKE PLEASE COMMENT HERE!!!
@user-ws8kv5zc4t
@user-ws8kv5zc4t 6 ай бұрын
import random print('ROCK PAPER SCISSORS') list=['rock','paper','scissor'] y_c=int(input('Enter your choice (0-Rock),(1-paper),(2-scissor) :')) if y_c>=3: print('Invalid choice ,Try again') else: you = list[y_c] print(f'You select :{you}') o_c=random.choice(list) print(f'Opponent choice :{o_c}') if y_c == 0 and o_c == 'rock': print('game again !') elif y_c == 1 and o_c == 'paper': print('game again !!') elif y_c == 2 and o_c == 'scissor': print('game again !!') elif y_c == 0 and o_c == 'paper': print('opponent win') elif y_c == 0 and o_c == 'scissor': print('you win') elif y_c == 1 and o_c == 'rock': print('you win') elif y_c == 1 and o_c == 'scissor': print('opponent win') elif y_c == 2 and o_c == 'rock': print('opponent win') elif y_c == 2 and o_c == 'paper': print('you win')
@sigmatronX
@sigmatronX 3 ай бұрын
from random import randint rock = 0 paper = 1 scissors = 2 user_choice = int(input("Enter 0 for rock, 1 for paper, 2 for scissors: ")) computer_choice = randint(0, 2) if user_choice == computer_choice: print("Draw") elif user_choice == rock and computer_choice == scissors: print("You WIN!") elif user_choice == paper and computer_choice == rock: print("You WIN!") elif user_choice == scissors and computer_choice == paper: print("You WIN!") else: print("Sorry, you lose.")
@rajraj-df8sk
@rajraj-df8sk Жыл бұрын
import random d = {0: 'rock', 1: 'paper', 2: 'scissor'} cpu = random.randint(0, 2) human = input("Enter 0,1 or 2: ") if human in ['0', '1', '2']: human = int(human) print(f"Cpu got {d[cpu]}") print(f"Human entered {d[human]}") if (cpu == 0 and human == 2) or (cpu == 2 and human == 1) or (cpu == 1 and human == 0): print(f'Cpu wins') elif cpu == human: print(f'Draw') else: print(f'Human wins') else: print("wrong input")
@randomfactz332
@randomfactz332 Жыл бұрын
whyi i not able solve this
Tuples in Python | Python Tutorials for Beginners #lec40
20:56
Jenny's Lectures CS IT
Рет қаралды 89 М.
ROCK PAPER SCISSORS game in Python 🗿
9:29
Bro Code
Рет қаралды 121 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 29 МЛН
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 30 МЛН
Fastest Way to Learn ANY Programming Language: 80-20 rule
8:24
Sahil & Sarra
Рет қаралды 807 М.
Python Beginners Mini Project - Dictionary DataBase 2022
13:44
5 Mini Python Projects - For Beginners
1:41:08
Tech With Tim
Рет қаралды 2,8 МЛН
If Else Statements in Python // Python RIGHT NOW!! // EP 4
14:19
NetworkChuck
Рет қаралды 397 М.
Learn Python With This ONE Project!
55:04
Tech With Tim
Рет қаралды 1,7 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 392 М.
Let's code a beginner's Python BANK PROGRAM 💰
15:01
Bro Code
Рет қаралды 132 М.
DICE ROLLER program in Python ⚂
10:06
Bro Code
Рет қаралды 61 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 5 МЛН