-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPracProject6.py
More file actions
50 lines (50 loc) · 1.58 KB
/
PracProject6.py
File metadata and controls
50 lines (50 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# def randomgen(a,b):
# import random
# return random.randint(a,b)
#
# if __name__ == '__main__':
# print("----------- Welcome to Guess the number Game (Multiplayer Version) ------------")
# count=0
# a=int(input("\nEnter Lower bound: "))
# b=int(input("\nEnter Upper bound: "))
# while(b<a):
# print("\nEnter the range again:-")
# a = int(input("\nEnter Lower bound: "))
# b = int(input("\nEnter Upper bound: "))
# n=randomgen(a,b)
# p1=1
# p2=1
# print("\nReady Player1: ")
# while(count==0):
# a=int(input("Enter a number: "))
# if a==n:
# print(f"\nCorrect!\n done in {p1} trials")
# count=1
# elif a>n:
# p1+=1
# print(f"\nHint: it is a number lower than that")
# else:
# p1+=1
# print(f"\nHint: it is a number higher than that")
#
# count=0
# n=randomgen(a,b)
# print("\nReady Player2: ")
# while(count==0):
# a=int(input("Enter a number: "))
# if a==n:
# print(f"\nCorrect!\n done in {p2} trials")
# count=1
# elif a>n:
# p2+=1
# print(f"\nHint: it is a number lower than that")
# else:
# p2+=1
# print(f"\nHint: it is a number higher than that")
#
# if(p2>p1):
# print(f"\nPlayer 1 wins with {p1} trials over {p2} trials")
# elif(p2<p1):
# print(f"\nPlayer 2 wins with {p2} trials over {p1} trials")
# else:
# print("\nIt is a draw")