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
Zielflug [23.3K]
2 years ago
6

Assume in the for loop header, the range function has the three arguments: range (1, 10, 3), if you were to print out the value

of the variable
in the for loop header, what will be printed out? List the values and separate them with a comma.
Computers and Technology
1 answer:
Licemer1 [7]2 years ago
6 0

Answer:

1, 4, 7

Explanation:

The instruction in the question can be represented as:

for i in range(1,10,3):

   print i

What the above code does is that:

It starts printing the value of i from 1

Increment by 3

Then stop printing at 9 (i.e.. 10 - 1)

So: The sequence is as follows

Print 1

Add 3, to give 4

Print 4

Add 3, to give 7

Print 7

Add 3, to give 10 (10 > 10 - 1).

So, it stops execution.

You might be interested in
The term ____ refers to a series of storage devices, such as tapes, hard drives, and cds, that are networked together to provide
Setler [38]

Answer:

SAN

Please Mark Brainliest If This Helped!

5 0
2 years ago
Write a Java program that reads two numbers from the console. Based on the example in the textbook, write five methods (min, max
makvit [3.9K]

Answer:

import java.util.Scanner;

public class num6 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter first number");

       int a = in.nextInt();

       System.out.println("Enter second number");

       int b = in.nextInt();

       //Calling the methods inside the output statement

       System.out.println("Min is "+min(a,b));

       System.out.println("Max is "+ max(a,b));

       System.out.println("Sum is "+sum(a,b));

       System.out.println("Product is "+product(a,b));

       System.out.println("Absolute difference is "+difference(a,b));

   }

   //Min Method

   static int min(int a, int b){

       if (a<b){

           return a;

       }

       else {

           return b;

       }

   }

   //Max Method

   static int max(int a, int b){

       if (a>b){

           return a;

       }

       else {

           return b;

       }

   }

   //Sum Method

   static int sum(int a, int b){

       return a+b;

   }

   //Diference Method

   static int difference(int a, int b){

       int diff = Math.abs(a-b);

       return diff;

   }

   //Product Method

   static int product(int a, int b){

       int prod = a*b;

       return prod;

   }

}

Explanation:

  • Using Java programming language
  • Use the scanner class to prompt and receive two values from the user (integers a and b)
  • Create the four methods as required (Please see the comments in the code)
  • In the difference method use Math.abs() to get the absolute value of the subtraction ensuring that you get a positive number returned
4 0
3 years ago
Read 2 more answers
Question #1
Evgen [1.6K]

Answer:

Pseudocode and flowchart.

Explanation:

I just got it correct.

8 0
3 years ago
What happens once the Insert tab is used in PowerPoint to insert a chart into a presentation?
DochEvi [55]

Answer:

A (because you can't have a chart without information, right?)

brainliest plz

Explanation:

8 0
2 years ago
Read 2 more answers
HELP ASAP!!! Prompt <br> What is word processing?
mina [271]
Answer:

Word processing refers generally to the creation, editing, formatting, storage, and output of both printed and online or electronic documents.
7 0
3 years ago
Other questions:
  • A technician is troubleshooting a small network with cable Internet service in which a user is receiving a message in her web br
    15·1 answer
  • Write a program that generates 1,000 random integers between 0 and 9 and displays the count for each number. (Hint: Use a list o
    12·1 answer
  • he timing device in an automobile’s intermittent wiper system is based on an RC time constant and utilizes a 0.500-μF capacitor
    10·1 answer
  • Passwords are usually alphanumeric and usually cannot contain spaces or ________.
    10·2 answers
  • Which of the following statements is not correct ​
    6·2 answers
  • A(n) ____________________ is a hardware device or software utility designed to intercept and prevent unauthorized access to a co
    6·1 answer
  • Create a float variable named circumference.
    11·1 answer
  • ONlY OnE pErcEnT oF pEOpLe CaN sOlvE tHiS!
    7·2 answers
  • Where should citations be included in your research paper? Select all that apply.
    13·1 answer
  • Which of the following best describes contextual design?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!