diff --git a/w1_1.py b/w1_1.py new file mode 100644 index 0000000..195e204 --- /dev/null +++ b/w1_1.py @@ -0,0 +1,55 @@ +from multiprocessing import parent_process + + +name1=input("Player 1:") +name2=input("Player 2:") +player_1=0 +player_2=0 +rock=int(0) +paper=int(1) +scissors=int(2) +i=1 +while i<=4: + print("Rock Paper Scissors?") + + choice1=int(input("Choice1:")) + choice2=int(input("Choice2:")) + + if choice1==0: + if choice2==0: + player_1=player_1+0 + player_2=player_2+0 + elif choice2==1: + player_2=player_2+1 + elif choice2==2: + player_1=player_1+1 + + + if choice1==1: + if choice2==1: + player_1=player_1+0 + player_2=player_2+0 + elif choice2==2: + player_2=player_2+1 + elif choice2==0: + player_1=player_1+1 + + + if choice1==2: + if choice2==2: + player_1=player_1+0 + player_2=player_2+0 + elif choice2==0: + player_2=player_2+1 + elif choice2==1: + player_1=player_1+1 + + i=i+1 + +print("name1---> {} player1---> {} name2---> {} player2---> {}".format(name1,player_1,name2,player_2)) +if player_1 > player_2: + print("{} won".format(name1)) +elif player_1 == player_2: + print("Game ended in a draw!!!") +else: + print("{} won".format(name2)) \ No newline at end of file diff --git a/w1_2.py b/w1_2.py new file mode 100644 index 0000000..1d25a9e --- /dev/null +++ b/w1_2.py @@ -0,0 +1,17 @@ +name=input("Student Name:") +surname=input("Student Surname:") +number=input("Student Number:") +courses=[] +for i in range(4): + course_name=input("Corse 1 Name:") + visa=int(input("Visa " + course_name +" point: ")) + final=int(input("Final " + course_name +" point: ")) + result=visa*0.4+final*0.6 + + if result<50: + print(course_name+ " Result is Failed") + elif result>=50: + print(course_name+ " Result is Passed") + + + diff --git a/w1_3.py b/w1_3.py new file mode 100644 index 0000000..8c6585b --- /dev/null +++ b/w1_3.py @@ -0,0 +1,11 @@ +weight=float(input("Please write your weight:")) +height=float(input("Please write your height:")) +bodyMassIndex=weight/(height**2) +if bodyMassIndex<25: + print("NORMAL") +elif 25<=bodyMassIndex<30: + print("OVER WEIGHT") +elif 30<=bodyMassIndex<40: + print("OBSE") +else: + print("EXTREMELY OBSE") \ No newline at end of file