When do you use a for loop instead of a while loop? (There may be more than one answer.)

You know how many times you want the loop to run.

To do number calculations.

To repeat code.

When there is a defined start and end.

Answers

Answer 1

Answer:

- You know how many times you want the loop to run.

- When there is a defined start and end.

Explanation:

Required:

When to use for instead of while loop?

First, it should be noted that both for loop and while loop are used for iteration. However, depending on the scenario; there is preference on one to the other.

The basic syntax of for loop is:

[tex]for(start;end;condition)\{\}[/tex]

The condition could either be increment or decrement

The basic syntax of while loop is:

[tex]while(condition)\{\}[/tex]

The condition could be any condition whatsoever

Analyzing the options one after the other.

1. How many times the loop to run.

The for loop is preferred here because of the simplicity of the for loop.

2. & 3. Both the for and while loops are used for code repetition and to perform number calculations

4. Defined start and end.

From the syntax of the for loop

[tex]for(start;end;condition)\{\}[/tex]

A for loop has a definite start and end in its basic syntax and is more preferable to use instead of a while loop.

Hence, 1 & 4 answer the question


Related Questions

HELP PLSSSSS!!! I WILL MARK BRAINLIEST FOR THE FIRST AND CORRECT ANSWER!!!

How does hardware differ from software?

Hardware can be an external tool, whereas software is an internal tool.
Hardware performs tasks, whereas software provides instructions.
Hardware runs the computer, whereas software performs tasks.
Hardware is the brain of a computer, whereas software is the heart.

Answers

The answer you are looking for would be A. Hardware can be an external tool, where as software is an internal tool. Hope this helped!

Answer:

The correct answer is A

Explanation:

Vincent has enrolled in a web development degree in college. But he also wants to learn a few extra tools and programming languages. Which course of action can help him?

Answers

Answer:

Apply for online course or programming bootcamps.

Explanation:

As a beginner in web development, it is essential to expand your sources of information, college courses for web development would introduce various new tools and programming concepts. Gathering information and learning other web based tools would ease the learning process.

I just downloaded this song and if any one wants to listen to it then go ahead and do that. It’s called Trap Music 2018 âa bass boosted trap mix.

Answers

Answer:

ok

Explanation:

PLEASE HELP ME I NEED IT DONE TODAY!!!!!!!!!!!!
Discussion Topic
You know how businesses use spreadsheets in their day-to-day operations for storing, computing, analyzing, and visualizing data. Discuss the advantages of using spreadsheets to manage and organize your personal life.

Answers

Answer:

They're free.

They require minimal training so they're easy to figure out

Spreadsheets are difficult to share internally.

Spreadsheets are easy to share externally.

There's no clear indication of who's working on what when.

Multiple versions of the truth so you don't always have to stick with just one

Errors, can be everywhere but they can be solved

Explanation:

My explanation is that spreadsheets can be confusing but when you take your time and get help working on them they can become 2nd nature. I got my ideas from personal experience with them with help from teachers.

can you please help look at the picture i will give you a. brainliest and 10 points​

Answers

Answer:

The last one

Explanation:

B Sofia should Distraction free Study environment. So she be Free to study with nothing Distracting Her.

Adam is an Engineering student but has decided that he does not want to work in that field, but in the Manufacturing career cluster. He enjoys the process of designing products. What career pathway would be the best fit for Adam?

Maintenance, Installation, and Repair pathway
Manufacturing Production Process Development pathway
Logistics and Inventory Control pathway
Health, Safety, and Environmental Assurance pathway

Answers

Answer:

Manufacturing Production Process Development pathway

Explanation:

The career pathway that would be the best fit for Adam is the manufacturing Production Process Development pathway. The correct option is b.

What is the manufacturing Production Process?

Knowledge-based, skill-based, entrepreneur-based, and freelance job options are the four main categories. Every type of career path caters to a particular set of skills that aid in job performance.

Knowledge-based career options enable you to perform your work using the knowledge you have accumulated over time. Process manufacturing is a type of production that involves integrating supplies, components, or raw materials according to a formula or recipe to produce items.

It is widely employed in sectors that manufacture things in large quantities, including those that generate food, drinks, refined oil, gasoline, pharmaceuticals, chemicals, and plastics.

Therefore, the correct option is b. Manufacturing Production Process Development pathway.

To learn more about career paths, refer to the link:

https://brainly.com/question/12208579

#SPJ6

QUICKLY PLEASE!!!

Respond to the following in three to five sentences.

What is the purpose of netiquette guidelines?

Answers

Answer: As the conventional etiquette, which lays out rules of ethics in social contexts, the purpose of netiquette is to help create and sustain a friendly, relaxed and productive atmosphere for online contact, as well as to avoid putting pressure on the system and creating tension between users.

Explanation:

Which position would a photographer typically use to make the viewer feel like an observer?
from below?
from the side?
from above?
from the front?

Answers

Answer:

From the side.

Explanation:

When the subject is faced away from the camera entirely, it’s easy to feel more like an unseen observer rather than an active presence. The further the distance between the camera and subject, the more the effect is intensified.

Can anybody do this for me

Answers

Answer:

943

The ENIAC was invented by J. Presper Eckert and John Mauchly at the University of Pennsylvania and began construction in 1943 and was not completed until 1946. It occupied about 1,800 square feet and used about 18,000 vacuum tubes, weighing almost 50 tons.

Explanation:

Computers have evolved and advanced significantly over the decades since they originated. Many years ago, in their most rudimentary form, computers were very large and slow. Gradually, computers have become smaller and faster, enabling people to use them virtually anywhere.

can i have brainliest

45 POINTS!!!!!!!!!!!PLZ HELP ME!!!!!!!!!!Select the correct answer. Which statement describes a characteristic of dynamic websites? A. They can be developed quickly. B. They are not functional. C. They are less flexible than static websites. D. They have content that is constantly updated. E. They are less expensive to host than static websites.

Answers

Answer:

D

Explanation:

Because anyone can update dynamic websites at any time, these are more functional and flexible. Therefore, content on dynamic websites keeps changing. Diverse content encourages users to return to these websites. The disadvantages of dynamic websites are that they are more expensive and take longer to develop than static websites. Hosting dynamic websites also costs more.

Answer:

D

Explanation:

A workspace that an employee accesses using a Web browser fits the definition of a _____.

•mobile device
•Wifi-enabled device
•collaborative environment
•virtual workspace​

Answers

Answer:

virtual workspace

Explanation:

I hope I've helped

AYYOOOO CAN YOU HELP A GIRL OUUTT???
Fields are data items representing a single attribute of a record. Question 2 options: True False

Answers

Answer: The answer is true

Images, symbols, and diagrams are types of

art objects
Graphs
graphics
presentation objects

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is :

Graphics

Because Graphics are the visual representation of information without text. Images, symbols, and diagrams are types of graphics. These graphics can be used in presentations to present information visually.

While other options are not correct because:

Art objects are some images or painting that is the artistic creation of aesthetic value. While graphs are the visual presentation of data and there are different presentation objects in PowerPoint such as images, symbols, text, and diagrams, etc. But it is noted that images, symbols, and diagram are not types of presentation objects but it is a type of graphics elements/objects.

Jared has trouble remembering when his assignments are due, and he wants to keep reminders on his computer. Which online note-taking tool would be the best one to use?

Answers

Answer and Explanation:

Google Keep & Google Reminders

Google Keep is an online stick-note tool, that also has an online reminder tool as well. You can also use another platform for reminders such as Google Reminders. Both platforms are easy, online and simple to use!

Answer: electronic sticky notes

Explanation:

:)

Which the following is true of functions?

A. Programs written with functions more quickly

B. Function can help remove repeated code from a program

C. Replacing repeated code with a function will reduce the number of commands the computer needs to run.

D. Functions are called once but can be declared many times

Answers

The answer you are clocking for is B. Hope this helped!

Which are examples of digital video? Choose all that apply.

video played from a reel and shown at a drive-in movie theater

video downloaded from a website and played on a portable electronic device

video streamed from a broadcast news website

video played from a DVD player

Answers

Answer:

B, C, D

Explanation:

Edge 2021

     Digital video is the electronic representation of moving pictures as digital data that has been encoded. Contrasted with this is analogue video, which uses analogue signals to represent moving pictures. Digital video is made up of numerous digital images that are shown quickly one after the other.

DV is a type of video format ?

       In order to transfer DV signals between devices, they are encoded into 80-byte blocks known as DV-DIF data (DV Digital Interface Format). These DV-DIF blocks can either be stored as raw files with the.dv or.dif extension or wrapped in other file formats like AVI, QuickTime, and MXF.

         A file produced by a digital camera and saved in a common raw format is known as a digital video (DV) file. Each Digital Interface Block (DIF) in a DV file contains 80 bytes. Audio, video, and metadata can all be found in DIF blocks.

      Who or what uses DV?  A group of video camera manufacturers led by Sony and Panasonic introduced the DV family of codecs and tape formats for digital video storage in 1995.

      DV(digital video) is one kind of video file captured by dv camera, mini dv, and digital 8.

      DV mode – what is it? A video standard called DV (Digital Video) was introduced in 1996. It was developed by a group of businesses and given the official designation IEC 61834. There are a number versions of the DV standard, including DVCAM (Sony) and DVCPRO (Panasonic). Customers are familiar with MiniDV, DV's smaller format.

To Learn more About  digital video (DV), Refer:

https://brainly.com/question/19554652

#SPJ2

Company Wizzy is having trouble with network security. Issues with authentication, viruses, malware/spyware, and other network intrusions are tapping their resources. They continually try to keep on top of things but are finding it harder and harder to do. They are considering a cloud computing service. Which service would be the best choice for them in solving their problem?

Infrastructure as a service
Network as a service
Security as a service
Software as a service

Answers

Answer:

B) security as a service I'm just doing the work

A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, drawing, and presentation management tools is called ?
A Microsoft Word
B Microsoft Excel C
Microsoft PowerPoint
D None of these are correct.

Answers

Answer:

C

Explanation:

Well, in your inquiry it says

"A presentation software that is used to organize and present pertinent information using graphics, word processing, outlining, drawing, and presentation management tools"

We know it isn't Microsoft Word, because Microsoft Word doesn't have a presentation feature. We know it isn't Excel because Excel is only meant for spreadsheet and analytics data.

However, on PowerPoint all these points make sense, PowerPoint is a tool that Microsoft created for the capabilities such as to present information, you can also put information inside of graphics as well, you can also draw, and outline too.

4.2 Lesson Practice Edhisive

Answers

Answer:

10

Explanation:

power supply, keyboard, monitor, mouse,ROM,CPU are belongs to Output, Input or Storage device​

Answers

Answer:

Keyboard :Input

Monitor: Output

Mouse:Input

ROM:Storage

CPU: Processing device

Why do numA and numB have the same scope in the subtract function? def subtract(numA, numB): return numA - numB def divide(numC, numD): return numC / numD answer = subtract(24,6) print (answer)

Answers

Answer:

The output of the subtract method is "18".  

Explanation:

In the above-given code, two methods "subtract and divide" is declared, that accepts two variable in its parameter, and method work with there respective names.

In this code, the subtract method accepts two-variable "numA and numB", within the same scope because it helps the method in proper functioning, and if the variable is no defined in the scope it will give an error.

Answer: 18

Explanation: got it right on edgen

computer network reduces expenses of an office justify this statement​

Answers

Answer:

Computer Network reduces expenses of an office. Justify this statement with an example. Computer Networks can allow businesses to reduce expenses and improve efficiency by sharing data and common equipment, such as printers, among many different computers.Explanation:

A material systems developer typically combines the skills of a programmer with the multitasking expectations of a
.

Answers

Explanation:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

don't delete my answer this time i try to help ppl

Explain what iteration is and why we need it in code

Answers

Answer:

Explanation:

When a cycle of instructions is carried out in a repeated manner, it is called a loop. It is the replication of a process in a computer program, commonly executed with the use of loops. Iteration is essential as it lets a programmer streamline a design by declaring that definite steps will be repeated.

What is required to view other users’ calendars in Schedule view? Check all that apply.

their e-mail addresses
true Exchange Environment
their Outlook password
an e-mailed version of their calendar
privileges to share and view calendars

Answers

Answer: A, B, D, E, F

Explanation:

Answer:

ABDEF

Explanation:

Drag the tiles to the correct boxes to complete the pairs.
Match the OOP concept to its definition.

Answers

Answer:

Operation open purpose

Answer:

attach the question?

Explanation:

Landrolold are u there ???

Answers

Answer:

what is this landrolold

List any ten keyboard symbols.​

Answers

Answer:

Esc- Esc (escape) key.

F1 - F12 What are the F1 through F12 keys?

F13 - F24 Information about the F13 through F24 keyboard keys.

Tab Tab key.

Caps lock- Caps lock key.

Shift- Shift key.

Ctrl - Control key.

Fn- Function key.

Alt- Alternate key (PC only; Mac users have an Option key).

Spacebar- Spacebar key.

Hope this helps, have a great day/night, and stay safe!

What are some of the ethical issues that can arise from the use of social media?

Answers

Participant privacy, confidentiality and anonymity. Participant privacy, confidentiality and anonymity were the most commonly reported ethical concerns

Which of the following is considered proper ergonomics?
Elevating keyboard, so wrists are bent when typing
Placing the mouse close to the keyboard
Resting wrists on the desk while typing
Working on a computer while sitting in a recliner

Answers

Answer:

The First One

Explanation:

because ergonomics is trying to make the person who is using the device be in a more natural position. Raising the keyboard will make the typer feel more comfortable.

Elevating keyboard, so wrists are bent when typing of the following is considered proper ergonomics. Thus, option (a) is correct.

What is ergonomics?

Human factors ergonomics, as it is known in North America, is an area of research that seeks to learn understanding people intelligence and constraints and then utilize this knowledge to improve people's interactions with things, systems, and surroundings.

Raising the keypad and bending the wrists when typing, according to ergonomics, are employed to place the person using the computer in a more favored role. Moving the keyboard relaxes the typer. Wrist supports are commonly seen on keyboards and keyboard trays to help keep your wrists in a normal, virtually straight position.

As a result, the elevating keyboard, so wrists are bent when typing of the following is considered proper ergonomics. Therefore, option (a) is correct.

Learn more about on ergonomics, here:

https://brainly.com/question/6246159

#SPJ5

Other Questions
Faith's grandma is making a blanket for her bed. The blanket needs to be 4 feet wide and 6 feet long. How many square feet of blanket does Faith's grandma need to make?A.10B.16C.20D.24 What expressions are equivalent to 6.7 - (-2.5) Allan can make 8 pizzas in 15 minutes at the pizza restaurant where he works. 28. __________ If the number of pizzas varies directly with minutes, how many pizzas can Allan make in 3 hours? 2. A parking lot has 68 rows with 24 parking spaces in each row. What is the total number of parking spaces? 1,632 1,502 408 272 Feo is the masculine singular form for the word ugly. o True o False Integrated Science- 8th grade sciencePlease Help ASAP!Its almost the end of semester And I need to fix my grade for science so PLEASE help!its almost report cards time! Find P(5) when p = 0.38i was swamped with work and my anxiety is flying off the charts rn Based on "Albert Schweitzer: A Life of Service and Sacrifice, which statement best describes Schweitzer as a young boy? Can someone please help 7. Which of the following accurately portrays what life was like for pioneers traveling west?A.Pioneers traveled along well-maintained trails with little difficulty.B.Entire families rarely traveled together because it was too dangerous for the children.C. Pioneers carried all their possessions on long and dangerous trails. ANSWER ASAP FOR BRAINLIEST Plzzz I need helpSpanish Given L(-4, 3) and M(-7, -2), what is the length of segment LM? helppp me plssss because its a test In the 1500s, the Council of Trent was led by a group ofLutheran ministers who wanted to spread their ideas.Catholic cardinals who wanted to reform the Church.German princes who wanted to end a peasants rebellion.Calvinists who wanted to make laws that followed their beliefs. Determine what kind of diet this animal has by examining its teeth.CarnivoreOmnivoreHerbivoreVegan 8-5(3x-7) i need help critical mass depends on all of the following except ____. Check all that apply. A. The polarity B. The density C. The Catalyst D. The shape The most likely function of the label X in the above figure isA. anchoring the virus to a cellB. injecting viral DNA into a cellC. assembling the parts of a virusD. sorting and protecting viral DNA HELP PLZ ASAP!What system of trading goods and slaves along a specific route brought economic success to the colonies? Economic Route Market Economy Slave Exchange Triangular Trade