Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A straight line is defined by an equation of the form y = mx + C, where m is the gradient and c is the

A straight line is defined by an equation of the form y = mx + C, where m is the gradient and c is the intercept on the y-axis. Write a function straightline(m, c) that takes the gradient m and the intercept c of a straight line as arguments and returns a list of points (tuples with two elements) on the line for the first 10 positive x-values (including 0). For instance, if m is 2 and cis 1, then the function should return the following list: [(0,1),(1,3),(2,5),(3,7),(4,9),(5,11),(6,13),(7,15),(8,17), (9,19)] Do not call the function. For example: Test Result print(straightline(2, 1)) [(0, 1), (1, 3), print(straightline(5, 0)) [(0, 0), (1, 5), Write a function straightline(m, c) that takes the gradient m and the intercept c of a straight line as arguments and returns a list of points (tuples with two elements) on the line for the first 10 positive x-values (including 0). For instance, if mis 2 and cis 1, then the function should return the following list: [(0,1),(1,3),(2,5),(3,7),(4,9),(5,11).(6,13).(7,15).(8,17).(9,19)) Do not call the function For example: ult 1), (1, 3), (2, 5), (3, 7), (4, 9), (5, 11), (6, 13), (7, 15), (8, 17), (9, 19)] 0), (1, 5), (2, 10), (3, 15), (4, 20), (5, 25), (6, 30), (7, 35), (8, 40), (9, 45)] Answer: (penalty regime: 10,20,...%)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Usability

Authors: Jakob Nielsen, Raluca Budiu

1st Edition

0133122131, 9780133122138

More Books

Students also viewed these Programming questions

Question

In your opinion, is mental illness currently overdiagnosed?

Answered: 1 week ago

Question

Please help!

Answered: 1 week ago