In which of the following scenarios would it be best to use a for loop?
1. When you need to stop looping based on input from the user
2. When you need to check that a user's input is valid.
3. When you want to ask the user for 10 numbers
4. When you need to be able to use the block of code in many places in your program

In Which Of The Following Scenarios Would It Be Best To Use A For Loop?1. When You Need To Stop Looping

Answers

Answer 1

Answer:

I would say 3 is the most likely answer ("When you want to ask the user for 10 numbers").

You use for loops to perform a task x times usually.


Related Questions

The only item on the desktop of a new Mac is the hard-drive icon.

True or false?

Answers

Answer:

False

There are many more items on the desktop of a new Mac than the hard-drive icon.

Which of the following is a sign you may be drowsy behind the wheel?
A. Jitteriness
B. Happiness
C. Unhappiness
D. Irritability

Answers

The sign that you may be drowsy behind the wheel is Unhappiness. The correct option is C.

What are feelings?

Feelings and emotions vary fundamentally in that feelings are experienced consciously, whereas emotions manifest either consciously or subconsciously.

Some people may go years, if not a lifetime, without comprehending the depths of their feelings. Drowsiness encompasses symptoms such as tiredness, inability to keep busy, feeling uninteresting, and the absence of happiness.

Therefore, the correct option is C. Unhappiness.

To learn more about feelings, refer to the link:

https://brainly.com/question/13044426

#SPJ1

Cyberbullying someone by threatening to hurt them is ethically wrong, but does NOT violate any laws. True False

Answers

False there’s some laws depending how far you go
false hope this helps :)

What order means that the highest numbers will be on top of the column

Answers

Answer:

Descending

Explanation:

Write the letter from D'Artagnan's father that was stolen from D'Artagnan in Meung. Include information about how D'Artagnan's father knows M. de Treville, describe D'Artagnan to M. de Treville, and request what D'Artagnan's father would like M. de Treville to do for D'Artagnan. Minimum 4 sentences.

Answers

Answer:

D'Artagnan's father advises him to be guided by his courage and his wits, ... town, but finds that the gentleman has stolen his letter of introduction to M. de Treville. ... D'Artagnan is received into M. de Treville's private chamber. However, before the two can speak, de Treville calls in two of his musketeers, Aramis and Porthos.

Explanation:

help help help help help help help help

Answers

Answer:

ok witch qeston

Explanation:

Answer:

2

Explanation:

What is Groovefunnels?

Answers


GrooveFunnels is a game-changer and it’s disrupting the market quite a bit.

Explanation:

Griovefunnels is a suite of digital marketing tools desinged to help you run a sucessfull online business .

What statement best describes percentage values in CSS?
A.It's the fraction of the value that came before it.
B.It's the smallest controllable element on the screen.
C.It's always the width of an indent.
D.It's a value that is relative to the width of its HTML element or to the page.

Answers

Answer:

Im sorry if its wrong but i believe its D.

Explanation:

D. It's a value that is relative to the width of its HTML element or to the page.

Answer:

The answer is

Explanation:

D. It's a value that is relative to the width of its HTML element or to the page.

which of the following best describes the relationship between oxygen and chlorine

Answers

Answer:

Oxygen - More size, Less covalent, Less electronegative. Chlorine - More size, Less covalent, Less electronegative.

These are the things they have in common.

Suppose you are purchasing something online on the Internet. At the website, you get a 10% discount if you are a member. Additionally, you are also getting a discount of 5% on the item because its Father's Day. Write a function that takes as input the cost of the item that you are purchasing and a Boolean variable indicating whether you are a member (or not), applies the discounts appropriately, and returns the final discounted value of the item. Note: The cost of the item need not be an integer

Answers

Answer:

The function is written in C++

void calc_discount(double amount,bool member)

{

 double discount;

 if(member)

 {

  discount = amount - 0.10 * amount - 0.05 * amount;

 }

 else

 {

  discount = amount - 0.05 * amount;

 }

 cout<<"Discount = "<<discount;

}

Explanation:

I've included the full source code (including the main method) as an attachment where I use comments as explanations

Write a program containing a loop that you execute 16 times. In the loop, generate two random numbers between 1 and 50. Divide the first random number by the second random number and print the result using 4 decimal places of accuracy.Lab Exercise #1 Put your name, the compiler used, and Lab Exercise #1 in a comment at the top of your program. Email your source code. This lab exercise is due at the beginning of the next lecture. You may email your lab solution prior to that. Remember to use "Ex1" as the subject of your email submission. Write a program containing a loop that you execute 16 times. In the loop, generate two random numbers between 1 and 50. Divide the first random number by the second random number and print the result using 4 decimal places of accuracy. Your output should look like this - except for different random values: 2.3333 35.0000 0.8000 3.2222 0.8667 0.1304 1.1429 0.2857 1.0698 0.7568 8.4000 0.7500 1.3030 1.2941 0.4130 1.7778 Hint: you should get a floating-point answer (a cast is suggested).

Answers

Answer:

Follows are the code to this question:

#include <stdio.h>// header file

int main()//main method

{

int i,x, y;//declaring integer variable

float result;//declaring flat variable

for(i=0; i<16; i++) //defining foe loop for calculate value  

{

x = (rand() % (50 - 0 + 1)) + 1;//use x variable for hold random value

y = (rand() % (50 - 0 + 1)) + 1;//use x variable for hold random value

result=(float)x/y;//use result variable for calculate value

printf("%.4f\n",result);//print value

}

return 0;

}

Output:

0.2200

0.2857

0.8684

0.7755

2.3000

0.1875

1.0500

1.3043

1.4839

1.2812

4.0000

0.9250

2.5000

1.8000

1.1034

1.1250

Explanation:

In the given code, three integer variable "i,x, and y" one float variable "result" is defined, in which integer variable "x and y" is used in the for loop, that uses the random function input value and in the float variable "result" it divides the value from x to y. This variable uses the typecasting to convert an integer to float and print its value.

write a program that first defines three string objects called firstName, middleName, and lastName which contains your own first, middle and last name separately. If you do not have middle name, then make up one. Then try to generate a new user name for you by using your first letter of your first name(captilized), first letter of you middle name (Captilized), plus all letters in your last name, add a random number between (1 to 100) to the your new user name. Here is an exampl: Name: John blake adams then the user name generated by your program coulde be: JBadams23

Answers

Answer:

Written in Python

import random

firstName = "Charles"

lastName = "Dawson"

middleName = "Rutherford"

pwd = firstName[0] + lastName[0]+middleName+str(random.randint(1,101))

print(pwd)

Explanation:

This line imports random library into the program

import random

The next three lines initializes the name of the user

firstName = "Charles"

lastName = "Dawson"

middleName = "Rutherford"

This line generates the password

pwd = firstName[0] + lastName[0]+middleName+str(random.randint(1,101))

This line prints the generated password

print(pwd)

what is input devices​

Answers

DescriptionIn computing, an input device is a piece of equipment used to provide data and control signals to an information processing system such as a computer or information appliance. Examples of input devices include keyboards, mouse, scanners, [[digital camera]The]s, joysticks, and microphones.

Answer:

An input Device are used to enter information such as letters, numbers, sounds or pictures into a computer.

What is the hexadecimal equivalent for the decimal number 27? Working must be shown

Answers

The answer is .9726

Explanation:

Instructions PhoneNumbersjava + 1 import java.util.*; 2 class PhoneNumbers 3 public static void main(String[] args) 4 //write code here A personal phone directory contains room for first names l and phone numbers for 30 people. Assign names and phone numbers for the first 10 people. Prompt the user for a name, and if the name is found in the list, display the corresponding phone number. If the name is not found in the list, prompt the user for a phone number, and add the new name and phone number to the list. Continue to prompt the user for names until the user enters quit. After the arrays are full (containing 30 names), do not allow the user to add new entries. Use the following names and phone numbers: Name Phone # Gina Marcia (847) 341-2392 Rita Jennifer (414) 234-0912 Fred Neil Judy (608) 435-0434 Arlene (608) 123-0312 LaWanda (920) 787-9813 Deepak (930) 412-0991 (847) 341-0912 (847) 354-0654 (414) 435-6567 (608) 123-0904

Answers

Answer:

What is the question?

Planned value:

How is it calculated?

Answers

Take the planned percentage of the completed work and multiply it by the project budget and you will get Planned Value.

which of the following is a chemical change.

A: Separating water into different glasses
B: breaking frozen ice cubes with a hammer
c: running an electric current through water
d: boiling water to evaporate it on a stove.

Answers

Answer:c

Explanation:

This Operating System was basically an upgrade to Windows 98 and was designed for home users. 1) Windows ME 2) Windows 2K 3) Windows 2000 4) Windows New Technology

Answers

the answer is windows2k3 hope this helps!

Which shortcut key aligns text to the center of a page?
O Ctrl+C
O Ctrl+Shift+C
O Shift+C.
O Ctrl+E

Answers

Option D, Ctrl + E aligns text to centre

it is Ctrl+E it’s the shortcut key that aligns text to the center of a page.

Which function prompts the user to enter information?

def main()
input()
int()
main()

Answers

Answer:

B. input()

Explanation:

Hope this helps :)

Answer:

Input()

Explanation:

So if you used process of elimination, you can see that def main() defines the start of the program and main() defines the end of the program. Also, int() is to solve without a decimal or special marking, therefore, input() would be the only reliable answer.

~i also got this correct on the test!~

Lazarus Consulting is a large computer consulting company in New York. Pete Lazarus, theà CEOà and founder, is well known for his philanthropic efforts. Pete knows that most of his employees contribute to nonprofit organizations and wants to reward them for their efforts while encouraging others to contribute to charities. Pete began a program that matches 50 percent of each employee donation. The only stipulations are that the charity must be a nonprofit organization and the company will match only up to $2,000 per year per employee.
Use the à data fileà provided to determine the following:
What was the total donation amount per organization?
What were the average donations per organization?

Answers

Answer:

There are too many weird characters in this question, so I am unable to fix it, comment on this with the correct characters so I can submit a correct answer.

4.1 lesson practice

Answers

Can you please include the picture of the question. Thank you! :D

What sequence is used to create a brochure document from a template?

Answers

Answer:

computer is used to create a voucher document

Choose the best technology device for the
scenario below.
A business professional works in an office
designing graphics for a company's
advertisements.
O Tablet PC
o Smartphone
Desktop computer with 2 screens
Laptop computer

Answers

Answer:

Desktop computer with 2 screens

Explanation:

All graphices designers need the most screen space possible

Answer:

Desktop computer with 2 screens

Explanation:

What does B the represent

Answers

Answer:

The B represents a boolean.

Helppp!!! Will give brainliest! Which of these operating system use the organize file?

Hypervisor

Firmware or wetware

Folders or directories

Output devices

Answers

Answer:hyperviser

Explanation:

Suppose a linked list of 20 nodes. The middle node has a data –250. Write the pseudocode to replace the middle node of the linked list with a new node and new data. Assume that the list's head pointer is called head_ptr and the data for the new node is called entry.

Answers

Answer:

The middle node has a data –250. ... Write The Pseudocode To Replace The Middle Node Of The Linked List With ... Assume That The List's Head Pointer Is Called Head_ptr And The Data For The New Node Is Called Entry ... Assume that the list's head pointer is called head_ptr and the data for the new node is called entry ...

Explanation:

Complete performance index:

How is it calculated?

Answers

Answer:

Remaining Work = Total budget – Earned Value. = (BAC – EV).

Choose the words that make the statement true. You wrote a program called firstProgram.

Your program is _____.

O always running in the background

O stored until you open the file

Answers

Answer:

Stored until you open the file

Explanation:

Your program is stored until you open the file.

-edge 2022

You wrote a program called first Program. Your program is stored until you open the file. The second option is correct.

What is program?

A program is made from code of instructions. A program is saved for later use.

When a program is opened, it is in running condition until it is closed. But when it is not in use, it gets stored at a location for next use.

You wrote a program called first Program. Your program is stored until you open the file.

Thus, the second option is correct.

Learn more about program.

https://brainly.com/question/3224396

#SPJ2

Im being timed please help!!

Where might you find help if material becomes truly difficult?
a.
A teacher
c.
A study group
b.
A tutor
d.
All of these


Please select the best answer from the choices provided

A
B
C
D

Answers

Answer:

ALL

Explanation:

Because if it was a test you can ask a teacher, if it was group projects you can ask the study group, if it was homework or 1 on 1  you can ask a tutor

Answer:

b

Explanation:

because a tutor deals with materials

Other Questions
Inez says you can plot 4/0 on a number line, but Jeremiah says you cannot. Who is correct? Explain three ways that early colonists adadpted to their environments to survive A. Write the first four terms of the sequence, given the nth term formula 1. an=2n+32. an=n2-1B. Supply the missing term for each sequence 1. 57,__,37,__172. __,__,0,12,24,363. -4,8,__16,-20C. Find the general rule or nth term for each sequence 1. 7, 12, 17, 22,...2. 2, 6, 12, 20,...D. Determine whether each sequence is arithmetic or not. Find the common difference for each arithmetic sequence 1. 4, 8, 12, 16,..2. 13, 10, 7, 4,...3. -10, -8, -6, -4,..4. 1, 6, 8, 11, 12,..5. 5,6,12,13 write a letter to your friend to inviteing him/her on your birthday. The introduction of a personal narrative should grab the reader's attention. True or False Describe two similarities between the reigns of Frederick 2 of Prussia and Catherine the Great of Russia what kind of impact do hot air balloons have? Tell me your favorite food actor or actress Find x, the missing side length in the right triangle.941 Thousands of years ago,people from Asia began moving into what is now the United States and Canada across an ____ land bridge that connected the two continents. in free market economy which social institution is most responsible for creating jobs ANSWER ASAP Read this passage.As a curator of the Art Institute of Chicago, I have witnessed the changing subject matter of American folk art. In this essay, Beyond the Barns, Ana Ramon explores the new faces and objects of this beloved genre.What feature distinguishes this passage as a foreword?A. It provides a high-interest hook.B. It offers background information on the topic.C. It is written by an expert on the books subject.D. It defines key terms related to the subject. During the Renaissance, people began to question religious ideas secular ideas classical ideas scholarly ideas On which continent were fossils of both Glossopteris and Lystrosaurus discovered? AustraliaSouth AmericaAntarcticaNorth America which statement is equivalent to the inequality | x-3 | > 5 What happens to the times difference between primary and secondary waves does the equation y = 3x+6 represent a proportional relationship? ASAPlook in the picture Which two specialists would most likely be on a multidisciplinary team for a diabetic patient?a psychiatristan endocrinologista cardiologista pediatriciana dietician Angad was thinking of a number. Angad doubles it and gets an answer of 46.8.What was the original number?