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
nydimaria [60]
3 years ago
10

1. Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z

Computers and Technology
1 answer:
mafiozo [28]3 years ago
7 0

Answer:

if x > 100:

   y = 20

   z = 40

Explanation:

You might be interested in
The following code segment is a count-controlled loop going from 1 to 5. At each iteration, the loop counter is either printed o
quester [9]

Answer:

True.

Explanation:

For all the count values, if Ranfun() returns true then all the values of count would be printed. Then the sequence of count values printed would be 1 2 3 4 5. Also for all the values of count if Ranfun() returns false then all the values would be enqueued. When we try to dequeue elements from queue we would get them in the same order of their entry into the queue. Thus, the sequence would be 1 2 3 4 5. Hence, we can say that this output sequence is possible. TRUE.

4 0
3 years ago
Help!! Best answer will get Brainliest!!
Eddi Din [679]

Answer:

answer(s):

-set goals

-select a topic

-write down research questions

Hope this helped and sorry for the bold. <3

Explanation:

6 0
3 years ago
Read 2 more answers
Create an application containing an array that stores eight integers. The application should call five methods that in turn:
Rus_ich [418]
<h2><u>Answer</u>:</h2>

public class ArrayMethodDemo {

   public static void main (String args[]) {

       int[] numbers = {12, 15, 34, 67, 4, 9, 10, 7};

       int limit = 12;

       display(numbers);

       displayReverse(numbers);

       displaySum(numbers);

       displayLessThan(numbers, limit);

       displayHigherThanAverage(numbers);

   }

   

   public static void display(int[] numbers) {

       

       //Message to be displayed before printing out the numbers

      System.out.print("Numbers in the array: ");

       

       //loop through the numbers in the array and print each number

       for(int x: numbers){

           System.out.print(x + " ");

       }

       

       //print a new line

       System.out.println();

   }

   

   public static void displayReverse(int[] numbers) {

       

       //Message to be displayed before printing out the reverse of the array

       System.out.print("Reverse of the array numbers: ");

       

       

       //loop through the array starting from the last index

       for(int i = numbers.length - 1; i > 0; i--){

           System.out.print(numbers[i] + " ");

       }

       

       //print a new line

       System.out.println();

   }

   

   public static void displaySum(int[] numbers) {

       

       //initialize the sum variable

       int sum = 0;

       

       //loop through the array and add each element to sum

       for(int i = 0; i < numbers.length; i++){

           sum += numbers[i];

       }

       

       //print out the sum

      System.out.println("Sum: "  + sum);

       

   }

   

   public static void displayLessThan(int[] numbers, int limit) {

       

       //Text to be displayed before printing values less than the limit

       System.out.print("Values less than limit (" + limit + "): ");  

       //loop through the array and print numbers lower than the specified limit

       for(int i = 0; i < numbers.length; i++){

           if(numbers[i] < limit){

               System.out.print(numbers[i] + " ");

           }

       }

       

       //print a new line

       System.out.println();

   }

   

   public static void displayHigherThanAverage(int[] numbers) {

       //initialize the average variable

       double average = 0.0;

       

       //initialize the sum variable

       int sum = 0;

       

       

       //loop through the array and add each element to sum

      for(int i = 0; i < numbers.length; i++){

           sum += numbers[i];

       }

       

       //calculate the average

      average = sum / numbers.length;

       

       //Message to be displayed before printing the values higher than the average

       System.out.print("Values higher than average (" + average + "): ");

       

       

       //loop through the array and print numbers higher than the calculated average

      for(int i = 0; i < numbers.length; i++){

           if(numbers[i] > average){

               System.out.print(numbers[i] + " ");

           }

       }

       

       //print a new line

       System.out.println();

   }

   

}

<h2><u>Sample Output:</u></h2>

Numbers in the array: 12 15 34 67 4 9 10 7  

Reverse of the array numbers: 7 10 9 4 67 34 15  

Sum: 158

Values less than limit (12): 4 9 10 7  

Values higher than average(19.0):34 67

<h2>Explanation:</h2>

The code above contains comments explaining important parts of the code. Kindly go through the comments. A sample output, arising from running the application, has also been added to ace understandability.

6 0
3 years ago
Which of the following are true about cryptocurrency wallets?
dezoksy [38]

Answer:

Looks like it is a multiple choice question

and you didn't give any choice

5 0
3 years ago
What are two ways that Performance Planner can help reveal the possibilities across all your Google Ads campaigns? (Choose two.)
torisob [31]

Answer:

Simulation

Validation

Explanation:

Simulation: Forecast engine simulates relevant ad auctions with query level variables, including seasonality, click through rate, competitors, landing page, and time of day.

Validation: Google perform forward and backward measurements of accuracy for thousands of campaign samples — across one, seven, 30, and 90-day periods — to ensure It is making valid recommendations.

4 0
3 years ago
Other questions:
  • If you bury a story on digg what have you done?
    7·2 answers
  • What best compares potrait and landscape orientations
    6·1 answer
  • A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single stateme
    6·1 answer
  • Grooves and polished surfaces on desert pebbles are most likely caused by
    10·1 answer
  • Which of the following is false? Group of answer choices A) A string may include letters, digits, and various special characters
    7·1 answer
  • How are logical operators used?
    14·1 answer
  • Which type of network cable is commonly used to connect office computers to the local network
    13·1 answer
  • Write a complete method to create an array of random integers. The method takes in three integer parameters: the array size, the
    9·1 answer
  • How do you select from the insertion point to the beginning of the current line?
    5·1 answer
  • Which workbook view is used most often in Excel?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!