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
Inga [223]
4 years ago
9

(Python question)

Computers and Technology
2 answers:
Alborosie4 years ago
7 0

Yo sup??

A real life example for 'for loop' and a 'while loop' would be

imagine if I opened a new burger shop.

we plan to issue a 'Thank you' message to the first 2000 customers and a 'Never to see you again' for all.

So for doing the first part ie to issue a 'thank you' message I will use a for loop because I am aware of the number of iterations whereas for the latter part ie to issues the 'never to see you again' message I would use a while loop cause I am not aware about the customers that are gonna visit my shop.

Hope this helps

PS: in which language is brainly written??

Law Incorporation [45]4 years ago
3 0

Hey!

---------------------------------------------------

Definition:

A "for loop" is something used for repeating things over a list of items. For instance, a list or a dictionary.

Code:

colors = ["red", "green", "blue"]

for x in colors:

 print(x)

---------------------------------------------------

Definition:

A "while loop" is is something used for carrying out a set of lines that are true.

Code:

n = 1

while i < 4:

 print(n)

 n += 1

---------------------------------------------------

Real-Life Example:

A real-life example would if I was a manager or boss for a company say that everyone was off a certain day. Like, if I said everyone was off for Christmas the 25th. If I had 1000 employees that would take a very long time to send an email to everyone. Instead of sending an email to everyone I can program code that uses "for loops" and "while loops" to create a message and send it to everyone.

---------------------------------------------------

Hope This Helped! Good Luck!

You might be interested in
Why we use cluster computing and hadoop framework for big data sysetm​
Ber [7]

Answer:

Explanation:

Hadoop clusters can boost the processing speed of many big data analytics jobs, given their ability to break down large computational tasks into smaller tasks that can be run in a parallel, distributed fashion.

5 0
2 years ago
Which setting indents all but the first line of a paragraph by the selected length?
Phoenix [80]

Answer:

Hanging

Explanation:

5 0
3 years ago
Windows apps are also known as
miv72 [106K]

Windows applications

8 0
4 years ago
Read 2 more answers
Which of the following is not a common business use of blogs? document sharing promotions posting answers to frequently asked qu
vagabundo [1.1K]
Document sharing I think
4 0
3 years ago
Read 2 more answers
List the four types of computer cases
nignag [31]

Answer:

full-tower, mid-tower, mini-tower, and SFF(Small Factor Form).

I hope it helps.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a recursive method to compute the following series: 1 + 1/2 + 1/3 + 1/i ... Write a test program that displays m(i) for i
    14·1 answer
  • With a ____ indent, all lines except the first line of the paragraph are indented from the left margin.
    12·1 answer
  • Maria found a cupcake recipe on a cooking blog. However, she would like to read comments and suggestions before she begins bakin
    6·2 answers
  • Using the ____ browsing mode offered by some browsers can prevent personal information from being left on a public computer.
    10·1 answer
  • What is output when the CarTest application is run? Why?
    11·1 answer
  • Write code for iterative merge sort algorithm. It is also known as bottom-up merge sort. There should not be any recursive call
    14·1 answer
  • Evaluating algebraic expressions 8(x+2)when x =6
    7·1 answer
  • Most job applications are online. true or false
    11·1 answer
  • All of the following are technical solutions to protecting user privacy except: Group of answer choices Data use policies Anonym
    12·1 answer
  • How would you identify communication equipment?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!