Python ile Taş Kağıt Makas Oyunu

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
26 Mar 2020
Mesajlar
65
Tepki puanı
3
Ödüller
3
Yaş
48
6 HİZMET YILI
baya iyi eline sağlık
Post automatically merged:

ellerine sağlık kardeşim
 
Onaylı Üye
Katılım
11 Nis 2020
Mesajlar
52
Tepki puanı
6
Yaş
35
6 HİZMET YILI
very well done! Add a loop for best of 3 condition :) that will make things very competitive!
 
Seçkin Üye
Katılım
6 Şub 2020
Mesajlar
310
Çözümler
1
Tepki puanı
10
Ödüller
1
Yaş
27
6 HİZMET YILI
eline sağlık reis baya güzel olmuş. emek var resmen
 
Onaylı Üye
Katılım
2 Tem 2019
Mesajlar
51
Tepki puanı
1
Yaş
28
6 HİZMET YILI
bende python başladım yeni yeni yaptığın örneğide deniyeceğim inşallah kendimi güzel geliştiririm örnek için teşekkürler
 
Onaylı Üye
Katılım
2 Tem 2019
Mesajlar
51
Tepki puanı
1
Yaş
28
6 HİZMET YILI
beğendim gayet başarılı bir çalışma deneyip bende yapacagım teşekkürler
 
Üye
Katılım
25 Nis 2020
Mesajlar
24
Tepki puanı
0
Yaş
26
6 HİZMET YILI
Merhaba arkadaşlar öncelikle bu benim ilk yazım olacak. Birkaç gün önce yaptığım bir taş kağıt makas oyunu var. İsteyen kodu kullanabilir herhangi bir sorun yok. Kendi editörünüzde kodu deneyebilirsiniz. İsterseniz geliştirip benimle paylaşabilirsiniz. Bu arada kodun ingilizce olma sebebi yabancı kaynaklarda da paylaşırım diye. Bol bol if, elif var. Çalışmak isteyenler inceleyebilirler.


Kod:
@author[/USER]: ElSlayeRR
"""

#Rock - Paper - Scissors
import random

pc =  ["rock", "paper", "scissors"]
print("Welcome. Please indicate your choice.")

choiceuser = str(input("Rock, Paper or Scissors?: ")).lower()
choicepc = random.choice(pc)

"""
Conditions That Going to Happen:
rock - rock
rock - paper
rock - scissors

paper - rock
paper - paper
paper - scissors

scissors - rock
scissors - paper
scissors - scissors
if (choiceuser = "x"), (choicepc = "x")
"""

if choiceuser == "rock" and choicepc == "rock":
   print("Rock and rock it's a tie!")

elif choiceuser == "rock" and choicepc == "paper":
   print("Paper wraps rock, Computer wins :(")
   
elif choiceuser == "rock" and choicepc == "scissors":
   print("Rock breaks scissors, you win!")
   
#First rock end. First paper starts.

elif choiceuser == "paper" and choicepc == "rock":
   print("Paper wraps rock, you win!")
   
elif choiceuser == "paper" and choicepc == "paper":
   print("Paper and paper, it's a tie!")
   
elif choiceuser == "paper" and choicepc == "scissors":
   print("Scissors cut paper, you lose :(")

#First paper end. First scissors starts.

elif choiceuser == "scissors" and choicepc == "rock":
   print("Rock breaks scissors, you lose :(")

elif choiceuser == "scissors" and choicepc == "paper":
   print("Scissors cut paper, you win!")

elif choiceuser == "scissors" and choicepc == "scissors":
   print("Scissors and scissors, it's a tie!")
   
# Conditions end. v

tam aradığım şeydi teşekkürler :D
 
Onaylı Üye
Katılım
27 Ağu 2017
Mesajlar
104
Çözümler
2
Tepki puanı
0
Ödüller
7
Yaş
35
8 HİZMET YILI
çok guzel olmuş başarilarinin devamini dilerim
 
Onaylı Üye
Katılım
31 Ara 2016
Mesajlar
71
Tepki puanı
2
Ödüller
5
9 HİZMET YILI
Merhaba arkadaşlar öncelikle bu benim ilk yazım olacak. Birkaç gün önce yaptığım bir taş kağıt makas oyunu var. İsteyen kodu kullanabilir herhangi bir sorun yok. Kendi editörünüzde kodu deneyebilirsiniz. İsterseniz geliştirip benimle paylaşabilirsiniz. Bu arada kodun ingilizce olma sebebi yabancı kaynaklarda da paylaşırım diye. Bol bol if, elif var. Çalışmak isteyenler inceleyebilirler.


Kod:
@author[/USER]: ElSlayeRR
"""

#Rock - Paper - Scissors
import random

pc =  ["rock", "paper", "scissors"]
print("Welcome. Please indicate your choice.")

choiceuser = str(input("Rock, Paper or Scissors?: ")).lower()
choicepc = random.choice(pc)

"""
Conditions That Going to Happen:
rock - rock
rock - paper
rock - scissors

paper - rock
paper - paper
paper - scissors

scissors - rock
scissors - paper
scissors - scissors
if (choiceuser = "x"), (choicepc = "x")
"""

if choiceuser == "rock" and choicepc == "rock":
   print("Rock and rock it's a tie!")

elif choiceuser == "rock" and choicepc == "paper":
   print("Paper wraps rock, Computer wins :(")
   
elif choiceuser == "rock" and choicepc == "scissors":
   print("Rock breaks scissors, you win!")
   
#First rock end. First paper starts.

elif choiceuser == "paper" and choicepc == "rock":
   print("Paper wraps rock, you win!")
   
elif choiceuser == "paper" and choicepc == "paper":
   print("Paper and paper, it's a tie!")
   
elif choiceuser == "paper" and choicepc == "scissors":
   print("Scissors cut paper, you lose :(")

#First paper end. First scissors starts.

elif choiceuser == "scissors" and choicepc == "rock":
   print("Rock breaks scissors, you lose :(")

elif choiceuser == "scissors" and choicepc == "paper":
   print("Scissors cut paper, you win!")

elif choiceuser == "scissors" and choicepc == "scissors":
   print("Scissors and scissors, it's a tie!")
   
# Conditions end. v
eline sağlık reis
 
Üye
Katılım
7 May 2019
Mesajlar
14
Tepki puanı
1
Yaş
36
7 HİZMET YILI
Merhaba arkadaşlar öncelikle bu benim ilk yazım olacak. Birkaç gün önce yaptığım bir taş kağıt makas oyunu var. İsteyen kodu kullanabilir herhangi bir sorun yok. Kendi editörünüzde kodu deneyebilirsiniz. İsterseniz geliştirip benimle paylaşabilirsiniz. Bu arada kodun ingilizce olma sebebi yabancı kaynaklarda da paylaşırım diye. Bol bol if, elif var. Çalışmak isteyenler inceleyebilirler.


Kod:
@author[/USER]: ElSlayeRR
"""

#Rock - Paper - Scissors
import random

pc =  ["rock", "paper", "scissors"]
print("Welcome. Please indicate your choice.")

choiceuser = str(input("Rock, Paper or Scissors?: ")).lower()
choicepc = random.choice(pc)

"""
Conditions That Going to Happen:
rock - rock
rock - paper
rock - scissors

paper - rock
paper - paper
paper - scissors

scissors - rock
scissors - paper
scissors - scissors
if (choiceuser = "x"), (choicepc = "x")
"""

if choiceuser == "rock" and choicepc == "rock":
   print("Rock and rock it's a tie!")

elif choiceuser == "rock" and choicepc == "paper":
   print("Paper wraps rock, Computer wins :(")
   
elif choiceuser == "rock" and choicepc == "scissors":
   print("Rock breaks scissors, you win!")
   
#First rock end. First paper starts.

elif choiceuser == "paper" and choicepc == "rock":
   print("Paper wraps rock, you win!")
   
elif choiceuser == "paper" and choicepc == "paper":
   print("Paper and paper, it's a tie!")
   
elif choiceuser == "paper" and choicepc == "scissors":
   print("Scissors cut paper, you lose :(")

#First paper end. First scissors starts.

elif choiceuser == "scissors" and choicepc == "rock":
   print("Rock breaks scissors, you lose :(")

elif choiceuser == "scissors" and choicepc == "paper":
   print("Scissors cut paper, you win!")

elif choiceuser == "scissors" and choicepc == "scissors":
   print("Scissors and scissors, it's a tie!")
   
# Conditions end. v
Hocam import randomda değerleri def ile de alabilirsainiz
 
Seçkin Üye
Katılım
21 Mar 2020
Mesajlar
442
Çözümler
3
Tepki puanı
43
Ödüller
5
Yaş
27
6 HİZMET YILI
Eline saglik sana başarılar dilerim
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst