Answer:
#code (count_seq.py)
def count_seq():
n='2'
while True:
yield int(n)
next_value=''
while len(n)>0:
first=n[0]
count=0
while len(n)>0 and n[0]==first:
count+=1
n=n[1:]
next_value+='{}{}'.format(count,first)
n=next_value
if __name__ == '__main__':
gen=count_seq()
for i in range(10):
print(next(gen))
Explanation:
- Start with number 2. Use string instead of integers for easy manipulation
.
- Loop indefinitely
.
- Yield the integer value of current n
.
- Loop until n is an empty string
.
- Loop as long as n is non empty and first digit of n is same as first
.
- Append count and first digit to next_value
.
A programming language is a set of words and symbols that a data analyst uses to communicate with a computer. Because a computer cannot understand human language directly, we developed programming languages that give instructions to computers using words and symbols.
What Is a Programming Language?
A programming language is a computer language that is used to communicate with computers by programmers (developers). It is a set of instructions written in any language (C, C++, Java, Python) to accomplish a specific task.
A programming language is primarily used to create desktop applications, websites, and mobile apps.
Who Is a Data Analyst?
A data analyst gathers, cleans, and interprets data sets to answer questions or solve problems. They work in a variety of fields such as business, finance, criminal justice, science, medicine, and government.
T oknow more about Programming Language, visit: brainly.com/question/16936315
#SPJ4
Answer:
The complete method is as follows:
public List buildList(List L)
{
L.insert(30);
L.insert(23);
L.insert(19);
L.insert(4);
return L;
}
Explanation:
To complete the method, we make use of the insert() function.
This inserts elements of the list into list L. However, we have to start from the last element (i.e. in descending order)
So, the explanation is as follows:
L.insert(30); --- This inserts the last element
Continue inserting in descending order
<em> L.insert(23); </em>
<em> L.insert(19);
</em>
Until the first list element is inserted
L.insert(4);
This returns the filled list L
return L;
Answer:
• Network intruders can access all computers on a network.
• Networks are costly to set up.
Explanation:
A network can be defined as a connection between the internet and the computer. A network is a means by which information or data are transmitted from one computer to another.
We have various types of networks and some of them are:
a) Local Area Network (LAN)
b) Wireless Local Area Network (WLAN)
c) Wide Area Network (WAN)
d) Campus Area Network (CAN)
e) Metropolitan Area Network (MAN)
f) Personal Area Network (PAN) e.t.c
The disadvantages of network are:
a) Network intruders such as computer hackers can easily access all computers on a network.
b) Networks are costly to set up.
It is of outermost importance that a network used by a computer is secured using security such as encryption in other to prevent data loss , hackers and exposure of information that are sensitive to computer users.
It s the main hteme
of the main point and the poijnt