Тёмный
No video :(

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

Jenny's Lectures CS IT
Подписаться 1,7 млн
Просмотров 97 тыс.
50% 1

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/...
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

Опубликовано:

 

21 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 167   
@kenshampton1321
@kenshampton1321 11 месяцев назад
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]}')
@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
@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 Месяц назад
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 29 дней назад
​@@midnightphantom4787can you write your code?
@SravaniGrandhisila
@SravaniGrandhisila 11 дней назад
import random user=int(input("enter your number where 0 for rock, 1 for paper, 2 for scissor:")) if user2: print("enter a valid number") else: print("start and enjoy the game!") computer=random.randint(0,2) print(f"computer selected number is {computer}") if user==computer: print("The game is a tie and play again") elif user==0 and computer==1 or user==1 and computer==2 or user==2 and computer==0: print("computer won the game!") else: print("user won the game!") print("Thank You")
@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.
@upendra0189
@upendra0189 Год назад
Always love for Jenny ma'am explanations ❤
@thetempest9469
@thetempest9469 Год назад
Bete
@cugansteamid6252
@cugansteamid6252 6 дней назад
logic is everything man, now i understand, thanks for the whiteboard explanation.
@tuhinghosh9737
@tuhinghosh9737 Год назад
Mam please continue the c++ course also ❤️
@midnightphantom4787
@midnightphantom4787 Месяц назад
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
@avinashsonu2424
@avinashsonu2424 Год назад
when will you start java mam
@balrajadira3612
@balrajadira3612 6 месяцев назад
With in 5 days
@jerrygeorgejoshi8009
@jerrygeorgejoshi8009 Месяц назад
@@balrajadira3612 😂🤣🤣
@user-tv9uj5hb8h
@user-tv9uj5hb8h 7 месяцев назад
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
@JabeenTaj46
@JabeenTaj46 9 месяцев назад
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')
@nandinidubey8968
@nandinidubey8968 Месяц назад
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")
@mrpashabook6050
@mrpashabook6050 7 дней назад
import random input("Start Play (rock,paper,scissor)") a = input("Enter Your Choise: ") b = ["rock", "paper", "scissor"] c = random.choice(b) print(f"you choise {a} and computer choise {c}") if a == c: print("Tie") elif a == "rock": if c == "paper": print("you lose") else: print("you Won") elif a == "paper": if c == "scissor": print("you lose") else: print("you won") elif a == "scissor": if c == "rock": print("you lose") else : print("you won") else: print("Your choise is invailid")
@SwadinSahoo-ih6jg
@SwadinSahoo-ih6jg 5 месяцев назад
00:01
@manfredmasiko4444
@manfredmasiko4444 Год назад
It has been a long time! But the great thing is you are eventually back🙏🙏😀
@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
@chandrasekar.r5311
@chandrasekar.r5311 Год назад
Kindly upload all topics in python asap mam. Your teaching is really helpful for python beginners....😊 Thanks in advance....
@user-rn8ql9yt9b
@user-rn8ql9yt9b 7 месяцев назад
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!!!!!')
@Rishav-tk5wc
@Rishav-tk5wc 2 месяца назад
your teaching skills are amazing mam 💓💓💓💓
@chikkiworld
@chikkiworld Год назад
Creating that rock, paper, scissor images was amazing mam❤
@sucharithapatnana2946
@sucharithapatnana2946 Год назад
Thank you mam please don't stop this series
@ManojShorts4K
@ManojShorts4K 6 месяцев назад
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
@nithinvasamsetti
@nithinvasamsetti 2 месяца назад
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")
@mr_affan15
@mr_affan15 Год назад
Mam plzz upload fast we are always eagerly waiting for your videos which helps a lot to learn
@gurulakshmi._
@gurulakshmi._ Год назад
Please continue this series without any breaks..
@v4ibhavxs
@v4ibhavxs 16 дней назад
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")
@KundaMohammed-hb4ro
@KundaMohammed-hb4ro Год назад
So happy that you are back mam.
@rtcreations01
@rtcreations01 11 месяцев назад
import random Computer_choice=random.randint(0, 2) user_choice=int(input("Enter Your Choice in numbers rock=0 paper=1 scissor=2 :")) print(f"Computer chose {Computer_choice}") if(Computer_choice==user_choice): print("The game is Draw") elif(Computer_choice==0 and user_choice==1): print("You won the game.. ") elif(Computer_choice==0 and user_choice==2): print(" Computer won the game") elif(Computer_choice==1 and user_choice==0): print("computer won the game") elif(Computer_choice==1 and user_choice==2): print("You won the game") elif(Computer_choice==2 and user_choice==0): print("You won the game") elif(Computer_choice==2 and user_choice==1): print("Computer Won the game") else: print("Enter the valid number")
@vijaykommula-5598
@vijaykommula-5598 9 месяцев назад
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
@obentheodore9037
@obentheodore9037 4 месяца назад
Just subscribed. Pls upload everything. Love your work and the way you teach.
@girishbv6713
@girishbv6713 29 дней назад
user_choice=int(input("Enter Your Choice of Number Between 0 , 1 and 2 : ")) import random computer_choice=random.randrange(0,3) print(user_choice) print(computer_choice) if (user_choice == 0 and computer_choice == 0) or (user_choice == 1 and computer_choice == 1) or (user_choice == 2 and computer_choice == 2 ) : print("It's a DRAW between You and The computer") elif user_choice==0 and computer_choice == 1: print("Computer Win") elif user_choice == 1 and computer_choice == 2: print("Computer Win") elif user_choice == 2 and computer_choice == 0 : print("Computer Win") elif computer_choice == 1 and user_choice == 2: print("You Win") elif computer_choice == 2 and user_choice == 0: print("You Win") elif computer_choice == 0 and user_choice == 1: print("You Win") else : print("Choose Number Between 0 , 1 and 2")
@gamingwithsane762
@gamingwithsane762 7 месяцев назад
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❤
@makupetrical003
@makupetrical003 3 месяца назад
#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")
@amithkulkarni4785
@amithkulkarni4785 7 месяцев назад
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')
@aravindjaladhi235
@aravindjaladhi235 Год назад
Thank u for continuing python tutorial classes 😂😂
@makupetrical003
@makupetrical003 3 месяца назад
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")
@snehakumari4331
@snehakumari4331 6 месяцев назад
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")
@AquaGamer777
@AquaGamer777 9 месяцев назад
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)
@botnet7456
@botnet7456 Год назад
i lubbbbbbb uuuuuu maam.. u r getting prettier day by day 💗 💓 💕 💖 💛 ❤️ 💗
@agnivabera5496
@agnivabera5496 Год назад
import random a=input("enter your choice(✊/🖐/✌):") b=[0,1,2]#0=rock,1=paper,2=scissor c=random.choice(b) if(c==0): print("computer's choice is: rock✊") elif(c==1): print("computer's choice is: paper🖐") else: print("computer's choice is: scissor✌") if(a=='rock' and c==0 or a=='paper' and c==1 or a=='scissor' and c==2): print("It's a draw 😑") elif(a=='rock' and c==1 or a=='paper' and c==2 or a=='scissor' and c==o): print('computer win 😏!!!') else: print('You win 🥳!!!')
@nirvikdutta3407
@nirvikdutta3407 Год назад
😧
@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
@KrishnaReddy-vz4cn
@KrishnaReddy-vz4cn Год назад
Very good explanation
@akkiaksahya123rd
@akkiaksahya123rd 5 месяцев назад
print(f'0-rock{" "}1-paper{" "}2-scissor') n=int(input("enter your choice:")) import random k=random.randint(0,1) if n==0: if k==0: print("tie") elif k==1: print("you lose") else : print("You won") if n==1: if k==0: print("you won") elif k==1: print("tie") else: print("you lose") if n==2: if k==0: print("you lose") elif k==1: print("you won") else: print("tie") print(k)
@asif_chouhanproduction415
@asif_chouhanproduction415 Год назад
Respected madam. Keep doing good
@saiyanwarrior3047
@saiyanwarrior3047 Год назад
First viewer and i wanna say please make some big broject we dont want pathar aur kechi aur kagaj
@shadabshaikh2305
@shadabshaikh2305 Год назад
Thank you and best video
@Fea_Tutorials
@Fea_Tutorials 10 месяцев назад
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")
@randouser403
@randouser403 Год назад
Thank you ma'am, these games are really cool!
@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")
@user-fb9dj1hx3g
@user-fb9dj1hx3g 10 месяцев назад
import random u=int(input('Enter user choice - 0 for Rock, 1 for Paper and 2 for Scissors: ')) c=random. randint(0,2) print(f'Computer choice:{c}') if(u==c): print('Draw') elif(u==0): if(c==1): print('Computer wins') if(c==2): print('User wins') elif(u==1): if(c==0): print('User wins') if(c==2): print('Computer wins') elif(u==2): if(c==0): print('Computer wins') if(c==1): print('User wins') else: print('User choice out of range enter number from 0 to 2')
@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?
@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.")
@muhammadshaheerkhan7212
@muhammadshaheerkhan7212 7 месяцев назад
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")
@megafamily1236
@megafamily1236 Год назад
@aniruthplayz150
@aniruthplayz150 10 месяцев назад
import random comp_ch=random.randint(0,2) print('COMP CHOICE IS:',comp_ch) user_ch=int(input('Enter your choice Rock=0 Paper=1 Scissors=2 :')) if (user_ch==comp_ch): print('DRAW') elif (user_ch==0): if (comp_ch==1): print('YOU LOSE!!') else : print('YOU WIN!!') elif (user_ch==1): if(comp_ch==0): print('YOU WIN') else: print('YOU LOSE!!') elif (user_ch==2): if(comp_ch==0):print('YOU LOSE!!') else : print('YOU WIN!!') else: print('YOU LOST AS YOU HAVE ENTERED WRONG CHOICE')
@learnConfidently242
@learnConfidently242 Год назад
MasAllah
@vkalyan8303
@vkalyan8303 Год назад
Looking gorgeous 😍
@venkateswarlugoud4564
@venkateswarlugoud4564 Год назад
Excellent mam❤❤😊
@Dheerajkumar-ve9wg
@Dheerajkumar-ve9wg 6 месяцев назад
import random User_choice = int(input("Enter 0 for Rock 1 for paper and 2 for scissor ")) computer_choice = random.randint(0,2) print(computer_choice) if(User_choice == computer_choice): print("its a Draw") elif(User_choice==0 & computer_choice ==1): print("computer wins") elif(User_choice ==1 & computer_choice ==2): print("computer wins") elif(User_choice ==2 & computer_choice ==0): print("Computer wins") else: print("User wins")
@venkateswarlugoud4564
@venkateswarlugoud4564 Год назад
Tq mam🎉🎉🎉
@zoakayasser3811
@zoakayasser3811 Год назад
Can you please do more of these project tutorials
@devSackey
@devSackey 9 месяцев назад
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")
@calmingmelody8846
@calmingmelody8846 Месяц назад
import random choice = input("Enter rock ,paper or scissor ") choice = choice.lower() list = ["rock", "paper", "scissor"] guess = random.choice(list) if choice == "rock": print(f"engine chose {guess}") if guess == choice: print("DRAW") elif guess == "paper": print("You lose") else: print("You win") elif choice == "paper": print(f"engine chose {guess}") if guess == choice: print("DRAW") elif guess == "scissor": print("You lose") else: print("You win") elif choice == "scissor": print(f"engine chose {guess}") if guess == choice: print("DRAW") elif guess == "rock": print("You lose") else: print("You win") else: print("invalid choice")
@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')
@TYashwanthBEC
@TYashwanthBEC Год назад
Can't we change the condition as if computer_choice - user_choice == 1 print("you lose")
@saisunil5893
@saisunil5893 Год назад
Cuteness overloaded❤❤
@pavanbhaigaming5530
@pavanbhaigaming5530 Месяц назад
import random game=['rock','paper','scisscors'] user_choice=input('enter your choice') a=random.randint(0,2) comp_choice=game[a] if comp_choice==user_choice: print('draw') if comp_choice==rock and user_choice==paper: print('you won') elif comp_choice==rock and user_choice==scisscors: print('you lose') elif comp_choice==paper and user_choice==scisscors: print('you won') elif comp_choice==paper and user_choice==rock: print('you lose') elif comp_choice==scisscors and user_choice==rock: print('you won') elif comp_choice==scisscors and user_choice==paper: print('you lose') else: print('unfound data') Mam pls tell me mam were I am doing wrong 😢😢 plsss i request u
@MS.17
@MS.17 9 месяцев назад
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")
@vickykumar-br6po
@vickykumar-br6po 11 месяцев назад
# 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")
@LingeshhvarenKA
@LingeshhvarenKA 4 месяца назад
print("Welcome to Rock,Paper,Scissor") print("Enter 1 for Rock Enter 2 for Paper Enter 3 for Scissor") player1=int(input("Player 1 Enter your choice : ")) player2=int(input("Player 2 Enter your choice : ")) if(player1==player2): print("Draw") elif(player1==1 and player2==2): print("Player 2 wins") elif(player1==2 and player2==1): print("Player 1 wins") elif(player1==1 and player2==3): print("Player 1 wins") elif(player1==3 and player2==1): print("Player 2 wins") elif(player1==2 and player2==3): print("Player 2 wins") elif(player1==3 and player2==2): print("Player 1 wins") else: print("Invalid Input")
@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
@kairakalyan1939
@kairakalyan1939 Год назад
##My God Iam exausted with her cuteness...❤❤❤
@Rajesh.kunchapu
@Rajesh.kunchapu Год назад
Thank you so much madam ☺️
@sruthy3319
@sruthy3319 Год назад
Hai mam an excellent teaching. Please upload a video about Sudoku solver using backtracking technique
@MARUTHU_1801
@MARUTHU_1801 28 дней назад
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!!!")
@Mythri333
@Mythri333 11 месяцев назад
Thank you ☺️
@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 3 месяца назад
No bro we can't. It can inserted only in a list😊
@RaghavsInfoRMCreation
@RaghavsInfoRMCreation Год назад
nice
@abhaykumartripathi2675
@abhaykumartripathi2675 Год назад
Please make a video on Python Panda and regular expression with pandas
@stephenoluwafemiherbert
@stephenoluwafemiherbert Год назад
Thanks
@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.")
@DivyaVani-ms2nr
@DivyaVani-ms2nr 11 месяцев назад
import random print("WELCOME TO GAME ") userchoice=int(input("enter your choice : ")) computerchoice=random.randint(0,2) print(computerchoice) if userchoice==computerchoice: print("draw") elif userchoice>computerchoice: print("you lose") elif userchoice
@rtcreations01
@rtcreations01 11 месяцев назад
In last case i.e computer==0 and Userchoice==2 is same as computer< userchoice ? I didn't get that...
@user-rq1ss5jm5x
@user-rq1ss5jm5x Год назад
Nice job💯👍 please make a video on python syntax
@ABMOVIES-telugu
@ABMOVIES-telugu 9 месяцев назад
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.')
@ahmadparsi6795
@ahmadparsi6795 11 месяцев назад
import random rock = 1 paper = 2 scissor = 3 computer = random.randint(1, 3) print(f"{rock} rock {paper} paper {scissor} scissor {exit} exit") user = int(input("choose one and start the game: ")) print(computer) if user == rock and computer == paper: print("computer win") elif user == rock and computer == scissor: print("user win") elif user == paper and computer == rock: print("user win") elif user == paper and computer == scissor: print("computer win") elif user == scissor and computer == rock: print("computer win") elif user == scissor and computer == paper: print("user win") else: print("none win please try again")
@Dan-gz7ve7le1m
@Dan-gz7ve7le1m 10 месяцев назад
import random users_choice = int(input("Enter 0 - Rock, 1 - Paper and 2 - scissors: ")) comp_choice = random.randint(0, 2) print(f"Computer's choice = {comp_choice}") if users_choice == comp_choice: print("You draw") elif users_choice > comp_choice: if users_choice == 2: print("You lose") else: print("You win") elif comp_choice > users_choice: if comp_choice == 2: print("You win") else: print("You lose") else: print("You've entered the wrong value You Lose")
@RahulSingh-cw8cn
@RahulSingh-cw8cn 11 месяцев назад
choice = int(input("1 rock 2 paper 3 sescors")) import random computer_choice = random.randint(1,3) #print(computer_choice) if(choice == 1): if computer_choice == 1 : print(f"match draw\t your choice = stone computer choice = stone") elif computer_choice == 2: print(f"you lose\t your choice = stone computer choice = paper") else : print(f"you won\t your choice = stone computer choice = sesceors") elif(choice == 2) : if computer_choice == 1 : print(f"you win\t your choice = paper computer choice = stone") elif computer_choice == 2: print(f"match draw\t your choice = paper computer choice = paper") else : print(f"you lose\t your choice = paper computer choice = sesceors") else : if computer_choice == 1: print(f"you lose\t your choice = sescors computer choice = stone") elif computer_choice == 2: print(f"you win\t your choice = sescors computer choice = paper") else: print(f"match draw\t your choice = sescors computer choice = sesceors")
@vinaymalik5437
@vinaymalik5437 Год назад
Mam please upload lectures on java and java using DSA
@tom9john
@tom9john 11 месяцев назад
print('lets play rock paper scissors...') rock=0 paper=1 scissors=2 print('enter your choice :',' ','enter 0 for rock',' ','enter 1 for paper',' ','enter 2 for scissors') userchoice=int(input()) choice=[0,1,2] import random compchoice=random.randint(0,2) if userchoice!=0 and userchoice!=1 and userchoice!=2 : print('invalid input') elif userchoice==compchoice : print('its a tie') elif userchoice+1==compchoice: print('computer ki jai') elif userchoice-1==compchoice: print('user ki jai') elif userchoice==0: print('user ki jai') else: print('computer ki jai') is there any mistake
@user-ev5bm7yx8i
@user-ev5bm7yx8i Год назад
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!!!
@wrapfreekzz
@wrapfreekzz Год назад
🧚‍♂️
@jeekakrishna
@jeekakrishna Год назад
i have made this game on python framework called streamlit.
@lyr4389
@lyr4389 Год назад
Lecture nhi main toh aapko dekhne aata hu beautiful mam
@gauravpratapsingh8526
@gauravpratapsingh8526 Год назад
mam please continue c++ series
@abhishekmatti2997
@abhishekmatti2997 Год назад
Tq mam
@suyogpardeshi5843
@suyogpardeshi5843 3 месяца назад
import random print("Rock Paper Scissor Game") print("2 players user and computer") choice=print("Rock:0 Paper:1 Scissor:2") user=int(input("Enter the no:")) if user not in[0,1,2]: print("Invalid Number or not a number") else: computer=random.randint(0,2) print("User entered:",user) print("Computer entered:",computer) if(user==0 and computer==1) or(user==0 and computer==2)or(user==1 and computer==2): print("Computer won") elif(user==1 and computer==0) or(user==1 and computer==2)or(user==2 and computer==1): print("User Won") elif(user==computer): print("Drawn the Match Because of Same Number")
@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
@dhanalakshmi7619
@dhanalakshmi7619 Год назад
Please complete DAA series mam
@MANOJGACHHIPURA
@MANOJGACHHIPURA Год назад
Mam I am not understand different between - Data + Database + Edp + DBMS + SQL + MS access ? I Need your help
@prabhas2186
@prabhas2186 Год назад
First view
Далее
5 Mini Python Projects - For Beginners
1:41:08
Просмотров 2,8 млн
СЛАДКОЕЖКИ ПОЙМУТ😁@andrey.grechka
00:11
Rusiya Prezidenti Vladimir Putin Bakıdadır
00:32
Просмотров 291 тыс.
Новый фонарик в iPhone с iOS 18
00:49
Просмотров 267 тыс.
ROCK PAPER SCISSORS game in Python 🗿
9:29
Просмотров 124 тыс.
5 Useful F-String Tricks In Python
10:02
Просмотров 296 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 396 тыс.
Learn Python With This ONE Project!
55:04
Просмотров 1,7 млн
3 Mini Python Projects - For Beginners
53:53
Просмотров 387 тыс.
СЛАДКОЕЖКИ ПОЙМУТ😁@andrey.grechka
00:11