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
What is another word for microchips operating systems input methods and everything in between?
lord [1]
The answer is computer. A computer is made up of microchips (CPU and GPU), an operation system (macOS or Windows), input methods (keyboard and mouse), and other parts.
7 0
3 years ago
Your worksheet contains confidential information in column C; to prevent others who use your worksheet from seeing the data, you
emmainna [20.7K]
To prevent others who use your worksheet from seeing the data you can hide column C
5 0
2 years ago
Design pseudocode for a program that will permit a user to store exactly 50 numbers in an array. Create an array big enough to h
galben [10]

Answer:

#include<stdio.h>

//declare a named constant

#define MAX 50

int main()

{

   //declare the array

   int a[MAX],i;

   //for loop to access the elements from user

   for(i=0;i<MAX;i++)

   {

      printf("\n Enter a number to a[%d]",i+1);

      scanf("%d",&a[i]);

  }

  //display the input elements

  printf("\n The array elements are :");

  for(i=0;i<=MAX;i++)

  printf(" %d ",a[i]);

}

Explanation:

PSEUDOCODE INPUTARRAY(A[MAX])

REPEAT FOR I EQUALS TO 1 TO MAX

PRINT “Enter a number to A[I]”

READ A[I]

[END OF LOOP]

REPEAT FOR I EQUALS TO 1 TO MAX

PRINT A[I]

[END OF LOOP]

RETURN

ALGORITHM

ALGORITHM PRINTARRAY(A[MAX])

REPEAT FOR I<=1 TO MAX

PRINT “Enter a number”

INPUT A[I]

[END OF LOOP]

REPEAT FOR I<=1 TO MAX

PRINT A[I]

[END OF LOOP]

6 0
3 years ago
How are authentication and authorization alike and how are they different? what is the relationship, if any, between the two\?
Helen [10]
  Both authentication and authorization are terms used in information security and <span>intelligently controlling access to </span>computer<span> resources. </span><span>Authentication is the process where by an individual’s (user's) identity is confirmed, whereas authorization is the association of that identity with rights/</span>privileges and permissions to resources related to information security.

3 0
3 years ago
Read 2 more answers
Operating systems employ a technique called ________ to prevent indefinite postponementâ as a thread waits in the ready state, t
BigorU [14]

Answer:

Aging

Explanation:

4 0
3 years ago
Other questions:
  • What is an additional clock tab
    11·1 answer
  • Choose the reasons why Windows Server operating systems are a popular choice for a network because they _____. Select all that a
    12·1 answer
  • What differentiates physical design from logical design?
    7·1 answer
  • This needs to be written in Java.
    11·1 answer
  • A user calls you and says that when they try to connect to the internal website, they are prompted for authentication. The user
    14·1 answer
  • Halp Computer Science
    12·2 answers
  • We already know that we can create a lunar lander application of the pipe-and-filter architecture style from three independent J
    6·1 answer
  • what will allow you to immediately exit the program without rebooting the computer, when you realize your browser is not respond
    7·1 answer
  • Please fill in I give 50 points!!
    13·1 answer
  • What are the advantages of cloud computing over computing on premises?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!