MyProgramming Lab

It needs to be as simple as possible. Each question is slightly different.

1. Given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of list1 and list2 (that is, the first element of list1 followed by the first element of list2 , followed by the second element of list1, followed by the second element of list2, and so on. Once the end of either list is reached, the remaining elements of the longer list is added to the end of the new list. For example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6, 7, 8], then the new list should contain [1, 4, 2, 5, 3, 6, 7, 8]. Associate the new list with the variable list3.

2. Given the lists list1 and list2 that are of the same length, create a new list consisting of the last element of list1 followed by the last element of list2, followed by the second to last element of list1, followed by the second to last element of list2, and so on (in other words the new list should consist of alternating elements of the reverse of list1 and list2). For example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6], then the new list should contain [3, 6, 2, 5, 1, 4]. Associate the new list with the variable list3.

3. Given the lists list1 and list2, not necessarily of the same length, create a new list consisting of alternating elements of list1 and list2 (that is, the first element of list1 followed by the first element of list2, followed by the second element of list1, followed by the second element of list2, and so on. Once the end of either list is reached, no additional elements are added. For example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6, 7, 8], then the new list should contain [1, 4, 2, 5, 3, 6]. Associate the new list with the variable list3.

Answers

Answer 1

Answer:

Explanation:

The following code is written in Python. It creates a method for each one of the questions asked and then tests all three with the same test case which can be seen in the picture attached below.

def alternating_list(lst1, lst2):

   lst3 = []

   for x in range(len(lst1)):

       lst3.append(lst1[x])

       try:

           lst3.append(lst2[x])

       except:

           pass

   if len(lst2) > len(lst1):

       lst3.extend(lst2[len(lst1):])

   return lst3

def reverse_alternating(lst1, lst2):

   lst3 = []

   if len(lst1) == len(lst2):

       for x in range(len(lst1) - 1, -1, -1):

           lst3.append(lst1[x])

           lst3.append(lst2[x])

   return lst3

def alternating_list_no_extra(lst1, lst2):

   lst3 = []

   max = 0

   if len(lst1) > len(lst2):

       max = len(lst2)

   else:

       max = len(lst1)

   for x in range(max):

       lst3.append(lst1[x])

       try:

           lst3.append(lst2[x])

       except:

           pass

   return lst3

MyProgramming LabIt Needs To Be As Simple As Possible. Each Question Is Slightly Different.1. Given The

Related Questions

What is different between science and technology





Answers

Answer:

Science involves observing a body of fact systematically through experiments while technology is the application of these established facts for the betterment of human lives and the world at large.

Explanation:

Science can be defined as a branch of intellectual and practical study which systematically observe a body of fact in relation to the structure and behavior of non-living and living organisms (animals, plants and humans) in the natural world through experiments.

Technology can be defined as a branch of knowledge which typically involves the process of applying, creating and managing practical or scientific knowledge to solve problems and improve human life. Technologies are applied to many fields in the world such as medicine, information technology, cybersecurity, engineering, environmental etc.

Basically, knowing how to use a technology simply means a scientist understands the appropriate method or technique to be used in the application of a technology such as when solving a problem. Also, knowing when to use a technology means to know the appropriate time to use a particular technology without it having any repercussion or adverse effect.

Generally, technology has impacted the world significantly and positively as it has helped to automate processes, increased efficiency and level of output with little or no human effort.

You have previously used slicing with strings.

What is the output?

str = 'abcdef'
print(str[2:5])


cde

bcde

cdef

bcd

Answers

Answer:

cde

Explanation:

just took the test :)

Answer:

cde

Explanation:

Which of the following allows computers to communicate with each other? RAM NIC Hard drive Floppy disk

Answers

Answer:

NIC (Network Interface Card)

Explanation:

A network interface card is used to connect a computer to a computer network allowing for data to be transmitted between computers.

11.5 Code Practice Edhesive??

In this code practice, we will continue to employ W3Schools tools to practice writing HTML. You should have already read through the tutorials for the four HTML topics below, found in Lesson 11.5. Now, complete the exercises linked below for each topic. Once you complete these exercises, move onto the next set of instructions below.

HTML Styles (Links to an external site.)
HTML Formatting (Links to an external site.)
HTML CSS (Links to an external site.)
HTML Links (Links to an external site.)
Create a web page that has two paragraphs. One of the paragraphs should be aligned to the center and have red text. The other paragraph should be aligned to the right and be in italics. Refer to the sample below for clarification.

11.5 Code Practice example

Your program should begin and end with the following tags:



# Insert your code here!


In the programming environment, you will notice that once you type one tag (for example, the html opening tag), the environment automatically populates the closing tag for you. Be careful not to double up on closing tags, otherwise your HTML will not run.

As you write your web page, you can click the "Run Code" button to view it in real time.

Answers

Answer:

<html>

<body>

<p style="text-align:center;color:red;">This is a paragraph.</p>

<p><i> "This text is italic</i></p>

</body>

</html>

Explanation:

I got a 75%. Hope this helps.

HTML codes are placed in segments called tags.

Tags are divided into two

The opening tagThe closing tag

Take for instance, the opening and closing tags of the paragraph tag are <p> and </p>, respectively.

Having explained what tags are, the required HTML code is as follows:

<html>

<body>

<p align="center"><font color="black"> This is a paragraph 1</font></p>

<p align="right"><i> This is a paragraph 2 </i></p>

</body>

</html>

The paragraphs are aligned using center and right alignments, while the text in the first paragraph is colored using the color tag

Read more about HTML at:

https://brainly.com/question/25055825

A Program is an Algorithm – a set of directions for the computer to follow.

True
False

Answers

Answer:

True

Explanation:

Which of the following is the most accurate definition of a botnet? a small text file passed to a Web browser on a user's computer by a Web server destructive software robots working together on a collection of zombie computers via the Internet spider software used by a search algorithm to crawl various Web sites to return a query a common platform used by search engines to index the contents of a Web site a fraudulent e-mail attack that targets a specific person or organization by personalizing the message

Answers

Answer:

destructive software robots working together on a collection of zombie computers via the Internet

Explanation:

Botnets are devices controlled via the internet to achieve a goal that requires multiple computers working towards a shared task. e.g. Denial of service attacks and mass email messaging.

What is the problem, if any, with the following code?The desired output is [3,19].

>>> aList = [19,3]
>>> aList[O] = aList[1]
>>> aList[1] = aList[O]
>>>aList

•There is no problem.

•You need a temporary variable to hold the value 3.

•You need parentheses around 0 and 1, as in
aList(0) and aList(1).

•You need to import list to use a list.

Answers

Answer:

             You need a temporary variable to hold the value 3.

Explanation: Other user is correct

The problem with the code is that you need a temporary variable to hold the value 3. which is the correct answer would be an option (B).

What is the temporary variable?

A temporary variable in computer programming is a variable with a brief lifespan, typically used to retain data that will be deleted quickly or before it can be placed in more permanent program memory.

The problem with the code is that you need a temporary variable to hold the value 3.

In the first line of the code, the list is initialized with the values 19 and 3. In the second line, the value at index 0 is assigned to the value at index 1, which is 3. This means that the list now contains values 3 and 3.

In the third line, the value at index 1 is assigned to the value at index 0, which is also 3.

This means that the list now contains values 3 and 3, so the output is [3,3] instead of the desired output [3,19].

To fix this problem, you can use a temporary variable to hold the value 3 before assigning it to the other index. The code would look like this:

aList = [19,3]

temp = aList[0]

aList[0] = aList[1]

aList[1] = temp

aList

To learn more about temporary variables click here:

https://brainly.com/question/20309413

#SPJ2

what is a robotic device?​

Answers

Answer:A robot is a programmable mechanical device that can perform tasks and interact with its environment, without the aid of human interaction. Roboticsis the science and technology behind the design, manufacturing and application of robots. The word robot was coined by the Czech playwright Karel Capek in 1921.

Explanation:

Answer:

A robot is a machine—especially one programmable by a computer— capable of carrying out a complex series of actions automatically. Robots can be guided by an external control device or the control may be embedded within.

Explanation:

A robotic device is a device that can be programmed and possibly be automated

why do we need to include this information about online platform?











꧁NOTE::::LINKS ARE NOT ALLOWED FOR THIS QUESTION꧂

Answers

Answer:

online platform is defined as a digital service that facilitates interactions between two or more distinct but interdependent sets of users (whether firms or individuals) who interact through the service via the Internet Like i said above, platforms enable interactions and transactions between interdependent groups. ... While traditional businesses create value by creating products or services, platforms create value by enabling these transactions.

Explanation:

~Bre

give me code so I can get rid of the time limit on my mac it is a mac big sure fully updated please help

Answers

Answer:

Explanation:

The time limit on your Mac is likely imposed by your parents. Mac OS allows parental control on children accounts. If you want to get rid of the time limit, you should log in using your parents' accounts.

Does any one know how to code? If you do can you help me with my project?

Answers

Answer:

kinda look it up!!!

Explanation:

go to code.org free coding

i can help you man

-scav aka toby

In a closed isolated system such as the universe, the amount of _____________ does not change.
Group of answer choices

Energy

Radiation

Chemicals

Sun light

Answers

Answer:

Energy

Explanation:

Correct procedures must be followed when working with asbestos because it

Answers

Answer:

is harmful to humans when inhaled and can lead to asbestosis

Explanation:

Asbestosis is the long-term scarring and inflammation of the lungs due to asbestos fibers.

how computer viruses spread from one computer to another​

Answers

Viruses spread when the software or documents they get attached to are transferred from one computer to another using a network, a disk, file sharing methods, or through infected e-mail attachments. Some viruses use different stealth strategies to avoid their detection from anti-virus software.

Question 21 pts How many lines should an email signature be? Group of answer choices "5 to 6" "7 to 8" "1 to 2" "3 to 4"

Answers

Answer:

"3 to 4"

Explanation:

Communication can be defined as a process which typically involves the transfer of information from one person (sender) to another (recipient), through the use of semiotics, symbols and signs that are mutually understood by both parties. One of the most widely used communication channel or medium is an e-mail (electronic mail).

An e-mail is an acronym for electronic mail and it is a software application or program designed to let users send and receive texts and multimedia messages over the internet.

An email signature can be defined as a group of texts (words) that a sender adds to the end (bottom) of his or her new outgoing email message. It is considered to be a digital business card that gained wide acceptance in the 21st century. Also, an email signature is a good etiquette in all formal conversations because it provide the recipient some level of information about the sender of an email message.

Ideally, an email signature should be three to four lines and must contain informations such as name, website address, company name, phone number, logo, catch phrase or quote, social icons, etc.

Additionally, you shouldn't place an email signature at the top or anywhere else in the email except at the bottom, immediately after the closing line.

explain four sitting postures in a computer laboratory​

Answers

1. Push hips back
2. Adjust seat
3. Sit up straight and roll your shoulders back
4. Feet flat on floor

30 points

A company values its data and therefore takes steps to ensure it is protected. Which of the following factors may be included in an AUP specifically to protect data?

(Choose all that apply.)

Use of nonsanctioned software on company computers.

Access to sensitive data should be limited to only employees that need the data to do their jobs.

Responsibility for keeping virus checker software is made explicit.

Staff should not read the news on CNN during company time.

They discover that employees, on company time and using company resources, disclose proprietary company information at social networking sites.

They discover that employees, on company time and using company resources, discredit their fellow employees at social networking sites.

Answers

Answer:

The options that apply are:

B, C, D,

Explanation:

AUP refers to the Acceptable Use Policy.

The AUP is usually created to protect company IT resources which include but are not limited to Data (as in information), Data (as in bandwidth) and general IT security.

When people are issued, an AUP, it is so that they understand that they aren't the only ones who need and who use the company's IT resources especially data, hence, they have to use the same responsibly.

So, it may be qualified as a "fair use policy".

It is usually created and administered by the owner, key administrator of an online network, website, or service.

It serves the purpose of providing guidance as to how the resource must be used.

Cheers

Finish the program by choosing the correct terms.

# Count the number of wins, losses. Find the sum of the opponent's points.
wins=0
losses = 0
sum = 0
_____ item in scores:

sum = sum + item[1]
if item[0] > item[1]
wins = wins +1
_____:

losses = losses +1

•Else
•For
•While

Answers

What are the exact numbers

Answer:

For

Else

Explanation: Got it right

You are the administrator for a small network with several servers. There is only one printer, which is centrally located. Although indications are that this printer is over-utilized, there is neither space nor budget to add additional printers at this time.

There are often cases where a document is needed urgently, but when it is printed, it goes into the queue and is printed in the order received, not the order of the document's priority. You would like to allow Gladys, the administrative assistant, to have the ability to maintain the print queue. Specifically, you want her to be able to alter the order of printing for the documents waiting to be printed.

You need to permit Gladys to make this change without adding her to the local Administrators group or making significant changes to the way your office operates.

What should you do?

Answers

Answer:

The answer is "Allocate permission for managing documents to the Gladys printer."

Explanation:

In the given scenario, we allow permission for managing the documents to the Gladys printer. It should enable Gladys could continue these trends by bringing something into the community of local administrators and introducing major changes to wherewith your office operates. In especially, they need her to modify its printing process regarding documentation requiring printing.

PLS, PLS, PLS, HELP! I RLY NEED THIS. PLSSSSS

A guest has requested to host a special event in the main dining room, and you've been asked to help with the planning. You need to order helium balloons from your local Party Center, but you are trying to keep costs down. Each balloon costs $1.00 but if you buy more you get a great discount. Here is the cost for balloons at the Party Center:

Up to 50 balloons - $1.00 each
Over 50 and up to 100 - $0.50 each additional balloon
Over 100 - $0.25 each additional balloon
For example, if you buy 150 balloons, it will cost you:
First 50 = $50
Next 50 = $25
Next 50 = $12.50
--------------------------
Total 150 balloons = $87.50

Write a program that prompts for the number of balloons and then calculate and display the total cost for the balloons for your party.

Answers

It's pretty hard but I think it is 1,350

Explain one rule the company must follow when using cookies on its website.

Answers

Explanation:

Work out what cookies your site sets, and what they are used for, with a cookie audit.

Tell your visitors how you use cookies.

Obtain their consent, such as by using Optanon, and give them some control.

What can help you estimate how much money you might get in
scholarships and grants at a given institution of higher education?
Net price calculator
Retun on investment calculator
Sticker price calculator
Clearance calculator
Next →

Answers

Answer:

Net price calculator

Explanation:

Net price is cost you need to pay in a year to cover education expenses for you to attend a particular college for higher education...I also just finished the test

B. Direction: Choose the letter of the correct answer.
11. Filler comes from silex, raw linseed oil, and turpentine.
A. Shellac
b paste filler C. Varnish
d. paint
12. A kind of varnish that is not waterproof.
A Paint
b. Shellac c. Enamel
d. Lacquer
13. What kind of varnish that dries up easily and is not waterproof? It comes from lac gum
diluted in alcohol
A Varnish
b. stains c. Enamel d. Shellac
14. A kind of stain that is easiest to apply on wood.
a. Spirit stain b. fillers c Oil stain
d. paint
15. It prevents moisture on the wood that causes decay.
a. Enamel
b. paint
c. Varnish
d. lacquer​

Answers

That the whole paper bro

Explica el funcionamiento del puente de diodos. Indica los diodos que se encuentran en polarizacion directa en inversa en cada semiciclo de la onda alterna de entrada

Answers

Answer:

puente de diodos se utiliza cuando queremos transformar una señal de fase alterna en una continua, para tener la ruta actual que siempre va en la misma dirección.

En polarización directa, el flujo depende principalmente en los portadores mayoritarios. Debido a la región de empobrecimiento reducida, y a la atracción del potencial contrario al material, se incrementa la corriente que fluye a través del diodo.

Explanation:

espero y esto te pueda ayudar

______ behavior expected from every professional​

Answers

Answer:

Respectful

Explanation:

:) y’all are so nice for helping me ty , but any idea what this is?

Answers

Answer:

Best way is 3

Worst way is the rest

Explanation:

Answer:

the answer is  3

someone help me!! i just gotta match these

Answers

Answer:

emails - allow attachments of files, such as images.

reports - convey more factual data that helps facilitate decision making.

memorandum - are written in a block style, with the body text aligned along the left margin.

business letter - are one page long.

I hope it's correct.

need the answer ASAP. I’ll mark brainliest

they’re all the same options for each sentence.

Answers

Answer:

Explanation:

pop(): Remove an item from the end of an array  

push(): Add items to the end of an array  

shift(): Remove an item from the beginning of an array  

unshift(): Add items to the beginning of an array

Renita manages a cell-phone store. She often needs to send contracts to business customers who are far away. Renita is most likely to use _____ for this job.


broadcasting

a teleprompter

a fax machine

the VoIP

Answers

Answer:

a fax machine.

I hope it helps.

Facial recognition software can do all of the following, except: Match photos based on facial features Generate a picture based on an eyewitness description Be used on a smartphone Search photo databases

Answers

Answer:

Generate a picture based on an eyewitness description

Explanation:

Facial recognition can only recognise faces it cannot generate new faces.

Other Questions
find the surface area of a prism with the length of 6m a width of 2m and a height of 10m. 156.43 - 42.1 EXPLAIN HOW YOU GOT IT AND ILL MARK BRAINLIEST! In the same scene, at 00:52:40, Morpheus yells at Neo: "What are you waiting for? Youre faster than this. Dont think you are, know you are."Morpheuss intention here appears to be to get Neo to disregard his own consciousness of himself and his limitations, and to know himself in the sense of being, not knowing himself through his perceptions or his thoughts about himself.The underlying, potential postmodern thought here isGroup of answer choices 6. "A student really idolizes his English teacher who is expert in grammar and literature.The former wants to write a scholarly chronicle about the latter's experiences includinghis family background, how he achieved his success in life, his likes and dislikes, hisachievements and struggles in life." What type of qualitative research should a studentemploy?a. Historical Researchb. Discourse Analysisc. Biographyd. Narrative Reportsystematically HELP!!! answer quickly pls Parallelogram PQRS has diagonals that are perpendicular. Based on that, which statement is most correct?A- Parallelogram PQRS is also a rectangleB- Parallelogram PQRS is also a rhombus.C- Parallelogram PQRS is neither a rectangle nor a rhombus.D- Parallelogram PQRS is both a rectangle and a rhombus, so it is a square. Please give me the correct answer.Only answer if you're very good at English.Please don't put a link to a website.What was one effect of the parent complaining that her daughter was cut from the cheerleading team?A: Kids refused to work hard once they were on the team.B:Kids who were already on the team decided to quit.C:Kids who did well in tryouts felt they were treated unfairly. When wind speeds are not fast enough to be called a hurricane, what is the name given? State the role of double fertilisation in ensuring the survival of flowering plants. How does making predictions and recognizing foreshadowing throughout a story provoke thinking and response? Need help on this question asap pleasee Ezra uses his bank card to buy gasoline for his car 3 times. Each time he buys gasoline, it costs $18.50. He then deposits $50 in his bank account. What is the change in his bank account balance in dollars as a result of these transactions? can you make alist of some baise and chaubise states Use GHJ, where A, B, and C are midpoints of the sides. When GH = 7z1 and CB = 4z3, what is GA? Cory owes $1,000 to his bank. During the time of his loan, he is charged a rate of 12% simple annual interest. If he does not make any payments on his loan, which table shows the relationship between the amount he owes and the number of months?A. Balance Due Number of Months$1,036 3$1,084 7$1,120 10B. Balance Due Number of Months$1,020 2$1,050 5$1,090 9C. Balance Due Number of Months$1,004.80 4$1,009.60 8$1,013.20 11D. Balance Due Number of Months$1,005 5$1,007 7$1,012 12 Which of the following chemical substances has diatomic molecules? a) carbon dioxide b) nitrogen c) ozone d) nitrogen dioxide Mitchell products manufacturers faux boulders to be used in various landscaping applications. A special resin is used to make the boulders. The standard quantity of resin used for each boulder is 2 pounds. Mitchell Products uses a standard cost of $1.80 per pound for the resin. The company produced 11,000 boulders in June. In that month, 21,750 pounds of resin were purchased at a total cost of $43,500.Calculate the direct material price variance. i need help quick plsss EASY 7TH GRADE MATH, WILL GET BRAINLIEST ima mark brainiest who trien helpWhich two individuals received a Congressional Medal of Honor for their service to the nation during the Civil War? aThomas Jefferson and Robert E. Lee bWilliam Carney and Philip Bazaar cStonewall Jackson and Hiram Rhodes Revels dDred Scott and Stephen Douglas