From 4c89443326bb9cb5922fab95cc2f9847b9c41354 Mon Sep 17 00:00:00 2001 From: Onur Bozkurtoglu Date: Mon, 7 Mar 2022 11:02:08 +0300 Subject: [PATCH 1/3] Create isLower.py --- isLower.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 isLower.py diff --git a/isLower.py b/isLower.py new file mode 100644 index 0000000..2dec60a --- /dev/null +++ b/isLower.py @@ -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")) From 8b160bd6bdf4db0aa17c2239518996684389fb59 Mon Sep 17 00:00:00 2001 From: Onur Bozkurtoglu Date: Mon, 7 Mar 2022 12:08:45 +0300 Subject: [PATCH 2/3] Move isLower.py to Stringler folder --- isLower.py => Stringler/isLower.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename isLower.py => Stringler/isLower.py (100%) diff --git a/isLower.py b/Stringler/isLower.py similarity index 100% rename from isLower.py rename to Stringler/isLower.py From dced84c0bcf3bf0205820bac77365c1de499fbd1 Mon Sep 17 00:00:00 2001 From: Onur Bozkurtoglu Date: Mon, 7 Mar 2022 12:11:02 +0300 Subject: [PATCH 3/3] Create rockPaperScissors.py --- "D\303\266ng\303\274ler/rockPaperScissors.py" | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 "D\303\266ng\303\274ler/rockPaperScissors.py" diff --git "a/D\303\266ng\303\274ler/rockPaperScissors.py" "b/D\303\266ng\303\274ler/rockPaperScissors.py" new file mode 100644 index 0000000..d6303d8 --- /dev/null +++ "b/D\303\266ng\303\274ler/rockPaperScissors.py" @@ -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