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
tekilochka [14]
3 years ago
6

Sonja is writing a program to compare two numbers and print the larger number. Which of these should be used?

Computers and Technology
1 answer:
seropon [69]3 years ago
7 0

Answer:

if and else

Explanation:

if (num1 > num2):

   print(num1)

else:

   print(num2)

You might be interested in
__________ is the brain of a computer.<br><br> A. Hardware<br> B. CPU<br> C. Memory<br> D. Disk
iren [92.7K]

Answer:

The CPU is the brain of a computer

8 0
3 years ago
Read 2 more answers
Its inventiveness uncertainty and futuristic ideas deals with science and technology,what is it?
Sedaia [141]

Answer:

Capital FM

Explanation:

8 0
3 years ago
Give ways on how to effectively save.​
sp2606 [1]

Answer:

Explanation:

say goodbye to debt. Monthly debt payments are the biggest money suck when it comes to saving. ...

Cut down on groceries. ...

Cancel automatic subscriptions and memberships.

4 0
3 years ago
Complete the sentence with the correct response. In a two-way selection, if the initial statement is evaluated as , the code ski
mestny [16]

Answer:

True.

The code skips the else command

Explanation:

I will answer this question with the following code segment

<em>n = 1</em>

<em>If n > 0:</em>

<em>   Print("greater than 0")</em>

<em>else:</em>

<em>   Print("not greater than 0")</em>

<em />

From the code segment above

<em>Print("greater than 0")</em> will be executed because the condition <em>If n > 0 </em>is true

Since the if condition is true, the else condition will not be executed

8 0
3 years ago
Using a loop and indexed addressing, write code that rotates the members of a 32-bit integer array forward one position. The val
My name is Ann [436]
<h2>Answer:</h2><h2></h2>

//begin class definition

public class Rotator{

    //main method to execute the program

    public static void main(String []args){

       

       //create and initialize an array with hypothetical values

       int [] arr =  {10, 20, 30, 40};

       

       //create a new array that will hold the rotated values

       //it should have the same length as the original array

       int [] new_arr = new int[arr.length];

       

       

       //loop through the original array up until the

       //penultimate value which is given by 'arr.length - 1'

      for(int i = 0; i < arr.length - 1; i++ ){

           //at each cycle, put the element of the

           //original array into the new array

           //one index higher than its index in the

           //original array.

          new_arr[i + 1] = arr[i];

       }

       

       //Now put the last element of the original array

       //into the zeroth index of the new array

       new_arr[0] = arr[arr.length - 1];

       

       

       //print out the new array in a nice format

      System.out.print("[ ");

       for(int j = 0; j < new_arr.length;  j++){

           System.out.print(new_arr[j] + " ");

       }

       System.out.print("]");

       

    }

   

   

}

<h2>Sample Output:</h2>

[ 40 10 20 30 ]

<h2>Explanation:</h2>

The code above is written in Java. It contains comments explaining important parts of the code.  A sample output has also been provided.

7 0
3 years ago
Other questions:
  • A new protocol for new information distribution proposed by CERN became the world wide wed in 1991.
    10·1 answer
  • 50 POINTS PLEASE HELP MEEEEEEEEE!!!!!!
    7·2 answers
  • "In a web app, where is data usually stored? A. Mobile network B. Application storage C. Local computer D. Cloud storage"
    14·1 answer
  • (1) Prompt the user to enter four numbers, each corresponding to a person's weight in pounds. Store all weights in a list. Outpu
    7·1 answer
  • Array unsortedArr contains an unsorted list of integers.
    10·1 answer
  • Write c++ program from 1to 100 to find prime numbers using statement.​​
    13·1 answer
  • 2. Sherry bought the following articles
    7·1 answer
  • What is the missing line of code?
    13·1 answer
  • How to disappear completely from the internet pc magazine
    7·1 answer
  • A(n) ________ is the portion of virus code that is unique to a particular computer virus. A) virus signature B) encryptio
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!