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
8. What is the correct jQuery code to set the background color of all p elements to red?
pickupchik [31]
The correct anwers is the letter b.)
3 0
3 years ago
Can you please help me?
DochEvi [55]

Answer:

  1. Pre-edited footage, usually direct from the camera.
  2. Process or result of selectively sequencing video and/or audio clips into a new video file.
4 0
3 years ago
PLEASE PLEASE PLEASEEEE HELP
labwork [276]

Answer:

Quality is critical to satisfying your customers and retaining their loyalty so they continue to buy from you in the future. Quality products make an important contribution to long-term revenue and profitability.

have a nice day! (^o^)

8 0
3 years ago
Suppose you need to create the variable fullname by concatenating the values of firstname, which contains first names, and lastn
Morgarella [4.7K]

The right way to remove extra blanks between first names and last names is

data temp;

set cert.maillist;length FullName $ 40;

fullname=trim(firstname)||' '||lastname;

run;

<h3>What is TempData?</h3>

This is known to be a term that is used to  transfer data from view to controller and it is one that saves the data temporarily.

Note that The right way to remove extra blanks between first names and last names is

data temp;

set cert.maillist;length FullName $ 40;

fullname=trim(firstname)||' '||lastname;

run;

Learn more about data from

brainly.com/question/25639778

#SPJ1

6 0
2 years ago
Which of the following skills do employers in any field expect their employees<br> to have?
Phantasy [73]
Any employer is looking for someone who has good common sense skills and is willing to learn
- some examples: Respectful, accountable/consistent, dependable/reliable, good manners/communication, having good body language is very important too
5 0
2 years ago
Read 2 more answers
Other questions:
  • If you're unsure of what chart to use for a set of data, what feature does Excel include that will help you to decide? A. Sparkl
    8·2 answers
  • How does the use of cloud computing affect the scalability of a data warehouse? a. Cloud vendors are mostly based overseas where
    6·1 answer
  • Suppose you use Batch Gradient Descent to train a neural network and you plot the training error at every epoch. If you notice t
    7·1 answer
  • A type of specialty processor devoted exclusively to protecting your privacy.
    9·2 answers
  • Phishing is a broad term that describes any program that is designed to cause harm or transmit information to others without the
    8·1 answer
  • What channel does the news come on? <br><br> i dont have cable i have roku :\
    8·1 answer
  • What are the answers for edhesive quiz 2? I can’t add more than 1 photo...
    11·1 answer
  • What is the number system that uses only the numbers 0 and 1?
    8·1 answer
  • Write a python code for a calculator
    8·2 answers
  • Help pls<br> cmu cs 0<br> 4.1.2.1 Creating Groups checkpoint 1
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!