Answer:
# user is prompt to enter p1
p1 = int(input("Enter P1: "))
# user is prompt to enter p2
p2 = int(input("Enter P2: "))
# check if p1 is not equals to p2
if(p1 != p2):
# check if p1 is greater than p2
# then it displays p1 is greater
if(p1 > p2):
print("p1 is greater than p2")
# check if p2 is greater than p1
# then it displays p2 is greater
elif(p2 > p1):
print("p2 is greater than p1")
# else it displays that p1 and p2 are equal
else:
print("There is a tie for p1 and p2")
Step-by-step explanation:
The code snippet is written in Python and is well commented.