At Westonci.ca, we connect you with the best answers from a community of experienced and knowledgeable individuals. Get immediate and reliable solutions to your questions from a community of experienced experts on our Q&A platform. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

Create a Python script that will compare two (2) numbers entered by the user. Refer to the attached image and to the following algorithm. There is no need to create a class similar to how Java works.

3.1. User enters the first number.
3.2. User enters the second number.
3.3. If the first number is less than, greater than, or equal the second number, a message is displayed.

Please Help me. Thank You!
Marry Christmas!​


Sagot :

x = int(input("Enter first number\n"))

y = int(input("Enter second number\n"))

if x > y:

   print(x, "is greater than", y)

elif x < y:

   print(x, "is less than", y)

else:

   print(x, "is equal to", y)

i'm not the greatest coder, but it works :)

Thanks for using our service. We aim to provide the most accurate answers for all your queries. Visit us again for more insights. Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. Thank you for visiting Westonci.ca. Stay informed by coming back for more detailed answers.