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
34 changes: 34 additions & 0 deletions Döngüler/rockPaperScissors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 7 11:40:57 2022

@author: bozku
"""
import random

player = input("Please, choose your role(for example, Rock, Paper, Scissors: ")
win = False;
random = random.randint(1, 3)
if random == 1:
bot = "rock"
elif random == 2:
bot = "paper"
else:
bot = "scissors"

while(win != True):
if (str.lower(player) == "rock" and bot == "scissors"):
print("Player[" + player + "] won against bot[" + bot + "]")
win = True
elif (str.lower(player) == "paper" and bot == "rock"):
print("Player[" + player + "] won against bot[" + bot + "]")
win = True
elif (str.lower(player) == "scissors" and bot == "paper"):
print("Player[" + player + "] won against bot[" + bot + "]")
Win = True
elif (str.lower(player) == bot):
print("It's draw. Player[" + player + "] - bot[" + bot + "]")
break
else:
print("Player[" + player + "] lost against bot[" + bot + "]")
break
20 changes: 20 additions & 0 deletions Stringler/isLower.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 7 10:36:03 2022

@author: Onur BOZKURTOGLU
"""

def isLower(word):
if (str.lower(word) == word):
return "\'" + word + "\'" + " tamamen küçük harflerden oluşmaktadır.";
else:
return "\'" + word + "\'" + " tamamen küçük harflerden oluşmamaktadır.";

print(isLower("ahmet"))
print(isLower("Ahmet"))

print("*****------------******")

print(isLower("ABCD"))
print(isLower("abcd"))