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]
3 years ago
9

(Python question)

Computers and Technology
2 answers:
Alborosie3 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]3 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
The ________ option contains the formatting and placeholders for all of the items that appear on a side.
densk [106]

Answer:

Slide Layout contains the formatting and placeholders for all items that appear on a slide.

Explanation:

Slide Layout:

Slide layout option in MS PowerPoint contains formatting, placeholders boxes and positioning for all the content that you put on a slide.

Slide layout option allows you to format the contents, insert placeholders boxes for contents such as text or images and do their positioning as you want to appear on a slide. Placeholders are the dotted line containers that hold the content such as title, body text, tables, smart art graphics, charts, pictures, videos, clip art, and sounds.

Slide layout also contains the fonts, effects, colors, and the background (all these collectively known as the theme) of a slide.

However, PowerPoint includes a built-in slide layout, and you can modify these layout on your slide according to your specific needs. Furthermore, you can share your customized slide layout with other people who want to create a PowerPoint presentation.

In addition to, you can built-in standard slide layout in PowerPoint in the Slide-Master View.

If you created the slide, and you want to customize that slide according to specific requirement then you have the option to apply the built-in standard layout on that slide to save the time. Because it is a much easy and time-saving task instead of customizing your own slide from scratch such as making aligning and positioning the contents on the slide

6 0
3 years ago
Internet control message protocol (icmp) is a method of ip address assignment that uses an alternate, public ip address to hide
Elanso [62]
B False





---------------------------------
3 0
3 years ago
Unlike memory, this type of storage holds data and programs even after electrical power to the computer system has been turned o
Scrat [10]

Answer:

Secondary memory.

Explanation:

Unlike main memory which loses its content when electrical power to the system is turned off, secondary memory is volatile and persistent in nature. i.e it retains its content whether or not power is supplied to the computer that is holding it. As a matter of fact, they (secondary memory) are meant to store data permanently. Examples of such memory are the hard drives, floppy disks, flash drives, CDs and CDROMs.

Also, unlike the primary or main memory that can be accessed directly by the processor of the computer housing it, secondary memory are not accessed directly.

8 0
3 years ago
How can earn more answer from brainly less than two minutes, please
Andrei [34K]
You have to answer other people’s questions.
6 0
3 years ago
WHAT 1 + 1 ???? ???????????????????
antiseptic1488 [7]
The answer to this is 11
5 0
3 years ago
Read 2 more answers
Other questions:
  • Create a funtion makeStudent(studentlist) where studentlist is your list of Student namedtuples The function should do the follo
    13·1 answer
  • "which part of an information system consists of the rules or guidelines for people to follow?"
    9·1 answer
  • Select the correct answer.
    9·1 answer
  • Match the number in the picture to the correct Excel interface part. Each number is only used one time.
    11·1 answer
  • If the Account Number field in a record always should display the three characters in the account number in uppercase, then the
    14·1 answer
  • What differentiates physical design from logical design?
    7·1 answer
  • A table is a useful way to present information that is organized into categories, or fields.
    15·1 answer
  • Help me or I'll go insane I've 6x already I'm about to lose it!!!!
    11·2 answers
  • "Rights and duties are two sides of the same coin." Explain with examples​
    5·1 answer
  • (40 PTS) Be specific
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!