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
suter [353]
2 years ago
12

Describe a situation in a program where you could write and use a "for loop".​

Computers and Technology
2 answers:
kykrilka [37]2 years ago
8 0

Answer:

  • Use the one that reads most clearly.
  • If you can’t decide, just pick one.
  • If you can’t then use for()
  • If at any point later in time you change your mind, refactor your code.

This is how professionals work. Decide, and for all things with low impact to change, don’t sweat it.

Save that for architectural and API design choices.

Answer#2:

  • Well if you are looking for a simple technique to choose which loop to use you can use these rules.
  • Use for loops when there's a sequence of elements that you want to iterate.
  • Use while loops when you want to repeat an action until a condition changes.

And if whatever you are trying to do can be done with either for or while loops then just choose your favourite :)

Marina86 [1]2 years ago
8 0

Answer: You can use a for loop for situations such as a questionnaire, data collection etc.

Explanation:

A 'For Loop' is a loop variable. As I said before, you can use it in instances such as questionnaires and data collection. To use a For Loop in Python simply type "for [VARIABLE] in range([HOW LONG YOU WANT THE LOOP TO GO]):. Indentation is key for this, so remember to always end this line of code with a colon.

You might be interested in
If you are interested in working for a specific company, what type of job site should you look at for opening?
Ainat [17]

Answer:

if you are finding to be a pilot you can find it at jinnah airport

Explanation:

3 0
3 years ago
How many people in the world
sveticcg [70]

Answer:

Around seven billion people

4 0
3 years ago
Which focal length and aperture combination is most likely to give you a deep depth of field?
frutty [35]

Answer:

f/11 is the answer I think

3 0
3 years ago
Simple measurement questions, I'm on #5 right now but if you know any other ones that would be helpful (picture)
dangina [55]

Answer:

one inch=25.4

12 meters=13.12

10 quarts=9.46

12 milliliters=0.0004

400 pounds= 181 kg

25 meters/second=82

68F=20C

Explanation:

heres the full ones

one inch=25.4

12 meters=13.1234 yards

10 quarts=9.46353

12 milliliters=0.000405768

400 pounds=181.437

25m/s=82.021f/s

68f=20C

7 0
3 years ago
1. It is one way to attain one's holistic health condition.​
suter [353]

Answer:

It focuses on complete human body condition rather than single parts. The person should be healthy in all dimensions.

Explanation:

Holistic health condition is an ancient approach to a healthy life. This is a study where human is considered as healthy if he has no illness plus he is able to interact with others. he healthy condition depicts mind, soul and body. The health conditions are based on dimensions rather than single body function.

3 0
3 years ago
Other questions:
  • A person planning to file for bankruptcy must receive credit counseling within two years before filing the petition.
    7·1 answer
  • Jeffrey works with a huge database of spreadsheet records each day. To organize and identify these spreadsheets, he wants to ass
    7·2 answers
  • I have a cosmetology essay due in 2 hours and i’m still on the research , please help .
    13·1 answer
  • 6.
    14·2 answers
  • Write a program that asks the user for two file names. The first file will be opened for input and the second file will be opene
    8·1 answer
  • Consider the following code segment. int[] seq = {3, 1, 8, 4, 2, 5}; for (int k = 1; k < seq.length; k++) { if (seq[k] >=
    5·1 answer
  • What is my favorite color?<br> Red<br>Orange<br>Yellow<br>Blue <br>Gold<br>Silver
    13·1 answer
  • "You have installed a point-to-point connection using wireless bridges and Omni directional antennas between two buildings. The
    8·1 answer
  • Algorithm to calculate the area of a square.​
    6·1 answer
  • Define computer architecture?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!