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
Do you think Google has an unfair advantage as a social media marketing platform? Explain.
Bond [772]
In some aspects, yes but these have recently been outweighed with the ad boycott youtube has not to mention google plus wasn't the most popular, to begin with, but in an overall sense yes as the name google is more often used than Facebook or twitter
3 0
3 years ago
Read 2 more answers
3. How do robots help speed up the fulfillment of orders at some Amazon warehouses?
vagabundo [1.1K]

Answer:

B is the only answer that makes sence

6 0
3 years ago
Read 2 more answers
What is known as the global network of computers?
Rudik [331]

Answer:

b. internet

Explanation:

cuz just b

7 0
2 years ago
Read 2 more answers
Ransomware as a service has allowed the increase of:.
Montano1993 [528]

Ransomware as a Service has allowed the increase of ransomware infections globally.

<h3>What is a Ransomware as a Service?</h3>

Ransomware as a Service is a type of business association between ransomware operators and affiliates. These affiliates pay to launch ransomware attacks developed by operators.

A ransomware is a type of malicious software that infects the computer of an organization thereby restricting access to their important data unless an amount of money is paid.

Ransomware as a Service has allowed the increase of ransomware infections globally because this business model has allowed malware creators to earn from their ransomware by enlisting a network of distributors.

Therefore, ransomware as a service has allowed the increase of ransomware infections globally.

Learn more about ransomware here:

brainly.com/question/23294592

6 0
2 years ago
A person's birth date consists of the month, day, and year in which that person was born. The domain for a relation R is a set o
Y_Kistochka [10]

Answer:

A parties order and a total order

Reason is because the person is the related to the person being discussed and they share the same birthday date.

3 0
3 years ago
Other questions:
  • I need help making a survey for highschool students in my school any topics/questions?
    9·1 answer
  • What type of organism forms the base of food webs?
    9·1 answer
  • Write a Python function that will accept as input three string values from a user. The method will return to the user a concaten
    8·1 answer
  • Bob works in a small office with a network of computers. Bob, along with all the other employees, is responsible for securing hi
    5·1 answer
  • What does the binary odometer show about representing large numbers​
    15·1 answer
  • Que es pilar en tecnologia
    11·1 answer
  • What is this?
    15·2 answers
  • Consider the following code:
    6·1 answer
  • Name any three areas of of application of excel.
    12·1 answer
  • In a database, what term is used to describe a group of fields that are all associated with and accessed using single primary ke
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!