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 continue statement _________.
Afina-wow [57]

Answer: C) Transfer control to another code

Explanation: Continue statement is a type of statement for the controlling of the loop. It has the main function of execution of the next  or another iteration. If the continue statement is executed inside a loop then the current execution of the statement will stop and jump on the next statement immediately and will transfer the loop there.

3 0
3 years ago
Which statements describe the advantages of using XML
nataly862011 [7]

Answer:

1. It saves file space.

2. It allows for data storage in a separate file.

Explanation:

3 0
2 years ago
A researcher wants to do a web-based survey of college students to collect information about their sexual behavior and drug use.
Brilliant_brown [7]

Answer:

True.

Explanation:

An investigator would like to do an internet-based college student survey to gather data regarding their behavior as well as drug use. Even so, specific identifications are still not gathered and IP addresses might be available in the set of data. Damage threat must be assessed both by the magnitude (or severity) and the likelihood (or likelihood) of the hurt.

7 0
3 years ago
Submit your 400-word essay that analyzes and evaluates three different examples of digital media. need some help
Vlada [557]

Answer:

Essay that analyzes and evaluates three different examples of digital media is described below in complete detail.

Explanation:

The 3 Types of Digital Media

  1. Owned Media
  2. Paid Media
  3. Earned Media
  • Owned media is what your label owns and manages. It doesn’t mean that you certainly own the program, but your corporation regulates the respective tales through which they publish their content about assistance and products.  
  • Paid media is considered attractive, and we’re all knowledgeable of it. It includes all marketing ways that a brand spends to get viewers. Here you spend a third-party program with specs on what you want.
  • Earned media is anything, whether content or remark, that stretches from another entity to help your brand. While most of it is optional, some expect you to contribute a substantial amount.

4 0
3 years ago
A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and
Cerrena [4.2K]

Answer:

A) Number of bits for byte = 6 bits

B) number of bits for index = 17 bits

C) number of bits for tag = 15 bits

Explanation:

Given data :

cache size = 64 kB

block size = 32 -byte

block address = 32 -bit

number of blocks in cache memory  

cache size / block size = 64 kb / 32 b = 2^11 hence the number of blocks in cache memory = 11 bits = block offset

A) Number of bits for byte

log _{2} (6)^2 = 6  bits

B) number of bits for index

block offset + byte number

= 11 + 6 = 17 bits

c ) number of bits for tag

= 32 - number of bits for index

= 32 - 17 = 15 bits

5 0
3 years ago
Other questions:
  • Explain why blocking ping (ICMP echo request) packets at an organization's edge router is not an effective defense against ping
    11·1 answer
  • A short-term job or work project that can be paid or unpaid and can lead to a full-time, paying position is called a(n) _____.
    5·2 answers
  • A small company has hired you to take over its IT needs. The company currently has seven on-site employees and 12 remote employe
    12·1 answer
  • zeroIt is a function that takes one argument and returns no value. The function stores the value 0 back into the parameter. x is
    8·1 answer
  • What was a result of george washington's belief in the sovereignty of the people instead of monarchy?
    9·1 answer
  • What are horizontal and vertical page break? how and where are these inserted?​
    10·1 answer
  • I came here for a answer so why did i get a pep talk
    7·2 answers
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • Cite some improved technology this 2021?
    5·1 answer
  • Which two choices are examples of trivial file transfer protocol (tftp) use? (choose two. )
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!