1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olin [163]
2 years ago
15

Python Coding:

Computers and Technology
1 answer:
leva [86]2 years ago
5 0

Answer:

# Here we are asking the user for a number two times

userInput1 = input("Enter any #: ")

userInput2 = input("Enter any # again: ")

# We compare if userInput1 is greater than userInput2

if(userInput1 > userInput2):

   # Print userInput1 if userInput1 is greather than userInput2

   print("First Number: " + userInput1)

   # Otherwise, print userInput2

else:

   print("Second Number: " + userInput2)

# Initiate a while-loop

while(True):

   # The lines below are from above

   userInput1 = input("\nEnter any #: ")

   userInput2 = input("Enter any # again: ")    

   if(userInput1 > userInput2):

       print("First Number: " + userInput1)

   else:

       print("Second Number: " + userInput2)

   # We ask the user whether they would like to stop

   stop = input("\nWould you like to stop? (Yes or No)")

   # Compare the String stop with "Yes"

   if(stop == "Yes"):

       # If true then break

       break

Explanation:

The use of \n is unnecesary, but it skips a line and provides more readability.

You might be interested in
Look at the following function prototype. double mynewFunction(int); What is the data type of the function’s return variable?
nadezda [96]
The answer is A) Double.

The return type is specified before the method's signature, and the signature is composed of the the method's name and parameters.

In this case, the method is named mynewFunction, takes in an integer as a parameter, and returns a double.

Also, fun fact which is kind of unrelated: if two or more methods have the same name, they can have different functionality as long as their signature is different (different parameter types).
3 0
3 years ago
Have some points part 6<br>anyone know how to change my username?​
ANTONII [103]
Thank u thank u
you’re literally the besttttt!! :)
7 0
3 years ago
Read 2 more answers
Clive wants to write a query that will display the names of the students who scored less than 10 in their final exams. Which num
Mice21 [21]
I'd go for <span>FLOOR(x)
</span>

The numerical function FLOOR(x) can be used to return the largest integer value that is less than or equal to the numerical expression provided. The numerical function CEILING (x) is the opposite of FLOOR(x) since it gives the smallest integer value that is greater or equal to the numerical expression.






6 0
3 years ago
Read 2 more answers
What is green computing in non-technical term?​
DochEvi [55]

Answer:

Green computing is also known as green information technology (green IT)

4 0
3 years ago
Why can’t I see one individual’s questions in the app through their profile, but I can see their questions on the website?
Mumz [18]

Answer:

I think thats just a software issue. i have the same problem

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Which is not an example of a boolean operator?
    6·2 answers
  • Which of the following would likely be covered under homeowners insurance but NOT by renter's insurance?
    9·2 answers
  • Create a program the outputs the total cost of a lunch order. Users should be prompted to input the number of hamburgers, fries,
    6·1 answer
  • Enter the number 2568 into the box below
    14·1 answer
  • Which of these statements makes the most sense? a folder is contained within a file. a file is contained within a folder. a driv
    9·2 answers
  • A program that processes data submitted by the user. Allows a Web server to pass control to a software application, based on use
    11·1 answer
  • "The ability to assign system policies, deploy software, and assign permissions and rights to users of network resources in a ce
    7·1 answer
  • 2.
    11·1 answer
  • Examples of email prividers​
    6·2 answers
  • Mha lovers why do other anime lovers report mha lovers for not liking there anime?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!