Answered step by step
Verified Expert Solution
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started