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]
3 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]3 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
Cuantos actos ay en el mito de aracne
mash [69]

Answer:

En el mito de Aracne hay un acto, que se desarrolla con cinco escenas.

Explanation:

En el mito de Aracne hay un solo acto, que se desarrolla con cinco escenas. En este mito, la joven Aracne es muy hábil tejiendo, tanto así se enorgullece de su talento que se compara y se considera mejor que la diosa Atenea. Esto último ofende a la divinidad, que le advierte sobre su egocentrismo, lo que lleva a que ambas mujeres participen en una competencia. Aracne demuestra ser muy hábil pero irrespetuosa, lo que hace enfadar a la diosa. Al final, la joven se da cuenta de su error y se ahorca, pero Atenea se apiada de ella y la transforma en una araña.

6 0
4 years ago
You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
salantis [7]

Home pc1 becouse it is the right one

3 0
3 years ago
Which customers are typical for the Argriculture,Food, and Natural Resources career cluster?
Ahat [919]

Ecosystem developers

8 0
4 years ago
Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
g100num [7]

Answer:

I am writing the program in JAVA and C++

JAVA:

public int createLicenseNum(int customID){  //class that takes the customID as parameter and creates and returns the licenseNum

       licenseNum = (100000 * customID) + licenseYear;  //licenseNum creation formula

       return(licenseNum);     }

In C++ :

void DogLicense::CreateLicenseNum(int customID){ //class that takes the customID as parameter and creates the licenseNum

licenseNum = (100000 * customID) + licenseYear; } //licenseNum creation formula

Explanation:

createLicenseNum method takes customID as its parameter. The formula inside the function is:

licenseNum = (100000 * customID) + licenseYear;

This multiplies 100000 to the customID and adds the result to the licenseYear and assigns the result of this whole expression to licenseNum.

For example if the SetYear(2014) means the value of licenseYear is set to 2014 and CreateLicenseNum(777) this statement calls createLicenseNum method by passing 777 value as customID to this function. So this means licenseYear = 2014 and customID  = 777

When the CreateLicenseNum function is invoked it computes and returns the value of licenseNum as:

licenseNum = (100000 * customID) + licenseYear;

                     = (100000 * 777) + 2014

                     = 77700000 + 2014

licenseNum = 77702014                                                                                                        

So the output is:

Dog license: 77702014          

To call this function in JAVA:

public class CallDogLicense {

public static void main(String[] args) {//start of main() function

    DogLicense dog1 = new DogLicense();//create instance of Dog class

dog1.setYear(2014); // calls setYear passing 2014

dog1.createLicenseNum(777);// calls createLicenseNum passing 777 as customID value

System.out.println("Dog license: " + dog1.getLicenseNum()); //calls getLicenseNum to get the computed licenceNum value

return; } }

Both the programs along with the output are attached as a screenshot.

3 0
4 years ago
Read 2 more answers
Describe the Sign in process of an Email account.​
Inga [223]
User inputs email. User inputs password , if password and username match user allowed through.If not password or email address is incorrect notification is shown - and there also may be a limit on the amount of attempts you have to get it right.
8 0
3 years ago
Other questions:
  • If electricity comes from electrons, does morality come from morons?
    9·2 answers
  • You have been studying processors. Your instructor has asked you to help prepare a lecture for introductory students learning ab
    10·1 answer
  • 2(x-5)-3(3-x)=1/2(x-2)
    9·1 answer
  • How Do I Make A Walk animation for a school Project?? Gifs?
    13·1 answer
  • Choose all items that represent essential items to bring to an interview.
    9·2 answers
  • What kind of waste does a computer generate?<br><br> Will give brainly :3
    12·1 answer
  • Type of operating system used i handleheld device
    6·1 answer
  • How many tables are needed to implement an REA data model that has five distinct entity-sets, two many-to-many relationships and
    6·1 answer
  • The correct banner marking for unclassified documents with cui is
    9·1 answer
  • 192.132.44.154<br> yes because why not
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!