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
55 changes: 55 additions & 0 deletions w1_1.py
Original file line number Diff line number Diff line change
@@ -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))
17 changes: 17 additions & 0 deletions w1_2.py
Original file line number Diff line number Diff line change
@@ -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")



11 changes: 11 additions & 0 deletions w1_3.py
Original file line number Diff line number Diff line change
@@ -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")