Question

Create a function called design_vector that receives as inputs the numbers start, end, and step. The...

  1. Create a function called design_vector that receives as inputs the numbers start, end, and step. The function will create a list of numbers starting at number start and ending at number end, with increments given by step. For example, if start=2, end=4, and step=0.5, the function must return the list [2, 2.5, 3, 3.5, 4]. On python
0 0
Add a comment Improve this question Transcribed image text
Answer #1
def design_vector(start, end, step):
    result = []
    n = start
    while n <= end:
        result.append(n)
        n += step
    return result


print(design_vector(2, 4, 0.5))

Add a comment
Know the answer?
Add Answer to:
Create a function called design_vector that receives as inputs the numbers start, end, and step. The...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT