From 9b3ad7eb56f7724c9a19d2a4f086b6bc3456ea63 Mon Sep 17 00:00:00 2001 From: Osmandursunn <51543896+Osmandursunn@users.noreply.github.com> Date: Sat, 18 Sep 2021 06:57:33 +0200 Subject: [PATCH 1/2] Week_1a --- week1_rock_paper_scissor | 81 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 week1_rock_paper_scissor diff --git a/week1_rock_paper_scissor b/week1_rock_paper_scissor new file mode 100644 index 0000000..2cc7784 --- /dev/null +++ b/week1_rock_paper_scissor @@ -0,0 +1,81 @@ +### Tas kagit makas programi yazmaya calistim +#### Kullanicidan bu seceneklerden birini aliyoruz +#####Bilgisayara karsi bir cevap almaya calisiyoruz +######Cevaplara gore bir puanlama olusturduk + + +import random + +input("Welcome to Rock, Paper, Scissors! Press enter to start. ") + +user_score=0 #kullanici skorunu belirtir +cpu_score=0 # vilgisayarin skorunu belirtir + + + +while True: + print() + user_choice = input("Rock, Paper, or Scissors?").lower() # seceneklerden birini yazmasini istiyoruz. + while user_choice != "rock" and user_choice!="paper" and user_choice!="scissors": + user_choice=input("Invalid input, please try again: ").lower() + + random_num=random.randint(0,2) #bilgisayardan randint fonk ile bu aralikta rastgele tam sayi atamasini istiyoruz. + if random_num == 0: #bu sayilari kullanicidan bekledigimiz cevaplara tanimliyoruz. + cpu_choice="rock" + elif random_num == 1: + cpu_choice="paper" + elif random_num == 2: + cpu_choice="scissors" + + + print() + print("Your choice : ", user_choice) + print("Computer's choice : ", cpu_choice) + print() + + + if user_choice=="rock": #kosul blogu ile olasi durumlari siralayip puanlamayi ayarliyoruz + if cpu_choice== "rock": + print("It's a tie!") + elif cpu_choice== "paper": + print("You lost") + cpu_score += 1 + elif cpu_choice== "scissors": + print("You win") + user_score+=1 + elif user_choice=="paper": + if cpu_choice== "paper": + print("It's a tie!") + elif cpu_choice== "scissors": + print("You lost") + cpu_score+=1 + elif cpu_choice== "rock": + print("You win") + user_score+=1 + elif user_choice=="scissors": + if cpu_choice== "scissors": + print("It's a tie!") + elif cpu_choice== "rock": + print("You lost") + cpu_score+=1 + elif cpu_choice== "paper": + print("You win") + user_score+=1 + + print() + print("You have ", user_score, " wins") #kullanici ve pc skorlarini yazdirdik + print("Computer have ", cpu_score, " wins") + print() + + repeat= input("Play Again? (Y/N)").lower() #kullanicinin donguyu basa almak isteyip istemedigini soruyoruz + while repeat != "n" and repeat != "y": + repeat=input("Invalid input, please try again:").lower() + + repeat= input("Play Again? (Y/N)").lower + while repeat != "n" and repeat != "y": + repeat=input("Invalid input, please try again:").lower() #gecersiz bir komut varsa kullanicinin duzeltmesini istiyoruz + + if repeat =="n": + break # donguyu sonlandiriyoruz + + print("\n.................\n ") \ No newline at end of file From f6af7c125d639e9c7a503b598443ed379384e4ac Mon Sep 17 00:00:00 2001 From: Osmandursunn <51543896+Osmandursunn@users.noreply.github.com> Date: Sat, 18 Sep 2021 07:06:58 +0200 Subject: [PATCH 2/2] week_1 --- week1_beden_kitle_indeksi_hesaplama | 22 ++++++++++++++++++++++ week1_ders_puani_hesaplama | 16 ++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 week1_beden_kitle_indeksi_hesaplama create mode 100644 week1_ders_puani_hesaplama diff --git a/week1_beden_kitle_indeksi_hesaplama b/week1_beden_kitle_indeksi_hesaplama new file mode 100644 index 0000000..4f770b1 --- /dev/null +++ b/week1_beden_kitle_indeksi_hesaplama @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Fri Sep 17 20:48:46 2021 + +@author: amsterdam +""" + +print("VÜCUT KİTLE ENDEKSİ HESAPLAMA PROGRAMI 💪") +boy = float(input("Boy (m):")) +kilo = int(input("Kilo (kg):")) + +endeks = kilo/(boy*boy) + +if endeks <25: + print("\n zayıf VKİ:{}".format(endeks)) +elif endeks >= 25 and endeks <30: + print("\n fazla kilolu VKİ:{}".format(endeks)) +elif endeks >= 30 and endeks <40: + print("\n obez VKİ:{}".format(endeks)) +else: + print("\n ciddi obez VKİ:{}".format(endeks)) \ No newline at end of file diff --git a/week1_ders_puani_hesaplama b/week1_ders_puani_hesaplama new file mode 100644 index 0000000..12e3a32 --- /dev/null +++ b/week1_ders_puani_hesaplama @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +Created on Fri Sep 17 20:40:40 2021 + +@author: amsterdam +""" + +vize = input('Vize Notunuz : ') +final = input('Final Notunuz : ') +ortalama=(float(vize)*0.4)+(float(final)*0.6) +print("Ortalama :{0} ".format(ortalama)) +if(ortalama<50): + print("Kaldınız") +else: + print("Geçtiniz") \ No newline at end of file