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
777dan777 [17]
3 years ago
5

MyProgramming Lab

Computers and Technology
1 answer:
Akimi4 [234]3 years ago
4 0

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

You might be interested in
Trojan Horse is a malicious program and a virus is a program. <br><br> a. True <br> b. False
SOVA2 [1]

Answer:

b. False.

Explanation:

Trojan Horse is a malware (malicious software/program) that can take over control of your machine. Trojan begins its action once it has been installed on the machine. With Trojan, hackers can have access to spy on a machine on which the Trojan has been installed thereby enabling them unauthorized access to sensitive data on the machine. With Trojan, user data can be blocked, stolen and even deleted.

A virus is also a malicious program just like Trojan. But unlike Trojan, a virus will replicate itself by copying itself to other programs in the affected machine thereby modifying these programs.

Both Trojan Horse (or simply Trojan) and Virus are malicious programs. Also, whether or not malicious, they are both programs. So it's superfluous to say one is a malicious program and the other is just a program.

Hope this helps!

7 0
4 years ago
Teniendo en cuenta la realidad mundial acerca de la pandemia, ¿cómo crees que impacta
KatRina [158]

Answer:

1.)death 2.)mow the lawn 3.)landscaping telemarketing teach.

FOR SPAINISH

1.) muerte 2.) cortar el césped 3.) paisajismo telemarketing enseñar.

5 0
3 years ago
What did basic elements of music look like in the Twentieth Century period?
Alexandra [31]

Answer:

I just want my 5 point lol sorry hope you get your answer

Explanation:

get terraria

5 0
3 years ago
What does it mean when system ui has stopped?
Andru [333]
One of the most common errors on electronic devices. This Error indicates that an update was "corrupted" or "Unsuccessfully patched"
7 0
4 years ago
Type the correct answer in the box. Spell the word correctly.
fomenos

Answer:

"a callout is a type of text box that also includes a line for pointing to any location on the document. A callout appears under the SHAPES menu of the word processing program. The answer that completes this statement is the word "shapes". Hope this answers your question."

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • Tower defense is included under which genre of game
    15·2 answers
  • What do you call the process of translating statements written by a developer? What is the result of this process?
    6·1 answer
  • Enter the number 2568 into the box below
    14·1 answer
  • Ng/ Computer Applications - Office 2016 - EL3520 A
    13·1 answer
  • Using the __________ option, you can change the state of a model back to where a particular feature or features weren`t yet crea
    7·1 answer
  • Digital certificates can be used for each of these EXCEPT _____. A. to encrypt channels to provide secure communication between
    13·1 answer
  • Do you agree that technology can be used to commit acts of violence ? Explain why or why not
    11·1 answer
  • From space, the world looks very different. Describe what these surfaces look like from an airplane’s view:
    13·2 answers
  • _____________are where you get down to business and enter data in a worksheet
    12·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!