Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions Döngüler/ibrahimmasmanaciDongu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
import random

#Coded by ibrahim Masmanacı
#Game iterates unless there is a winner , otherwise it loops.

gameLoops = True

while (gameLoops):
userSelection = input("Birini sec ! -> (1 = Taş) , (2 = Kağıt) , (3 = Makas ) = ")
i = (random.randint(1, 3))
pcSelection = ""

if i == 1:
pcSelection = "Taş"
if (userSelection == "1" or "Taş"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Taş")
print("berabere!")
gameLoops = True
elif (userSelection =="2" or "Kağıt"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Kağıt")
print("Kazandın!")
gameLoops= False
elif (userSelection =="3" or "Makas"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Makas")
print("Kaybettin!")
gameLoops = False

elif i== 2 :
pcSelection = "Kağıt"
if (userSelection == "1" or "Taş"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Taş")
print("kaybettin!")
gameLoops = False

elif (userSelection =="2" or "Kağıt"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Kağıt")
print("Berabere!")
gameLoops = True

elif (userSelection == "3" or "Makas"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Makas")
print("Kaybettin!")
gameLoops = False

elif i==3 :
pcSelection = "Makas"
if (userSelection == "1" or "Taş"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Taş")
print("kazandın!")
gameLoops = False

elif (userSelection =="2" or "Kağıt"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Kağıt")
print("kaybettin!")
gameLoops = False

elif (userSelection == "3" or "Makas"):
print("Pc secimi = " + pcSelection + ", Senin secimin = " + "Makas")
print("berabere!")
gameLoops = True

else:
print("Geçerli birsey seçemediniz..")

request = input("Tekrar oynamak istiyorsanız (+)'ya oynamak istemiyorsanız (-)'ye tıklayınız")
if(request == "+") :
gameLoops = True
else:
gameLoops = False



36 changes: 36 additions & 0 deletions Stringler/ibrahimmasmanaci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

# coded by IBRAHIM MASMANACI


#Solution by using for loop
name = input("Please enter something to check :")
print("The original string is : " + str(name))
result = False
for i in name:
# checking for uppercase character and flagging
if i.isupper():
result = True
break
# printing result
print("Does String contain uppercase character : " + str(result))
#second = input("Please enter the input : ")
#if second.__contains__(result):



#Solution without using any loop
nameSec = input("Please enter something to check :")
if nameSec.islower():
print("girilen kelime kücük harflerden olusur")
else :
print("girilen kelimede büyük hafrlerde bulunuyor.")