Nov-14-2018, 04:15 PM
Hello, I was wondering if I could get some instruction on where to begin with this homework question I'm having difficulty understanding. I'll post a picture of the question but there are a few things I'm having trouble even getting started with so if I could get a walkthrough on where to at least get started with the code and a few helpful pointers I'll be very appreciative.
To begin, the HW08data.txt file. How can I get the file loaded into the program so I can assign the data to variables? Once I have the variables, which I believe is actually 16 points of (x,y) values. I know I need to run a while loop to calculate m for all 16 points and then use m to calculate r, this r value should be between 0 and 1. Once that value is calculated, I need to remove a point from the loop and recalculate r to see if it moves closer to 1, if it does I continue the loop up until it stops increasing closer to 1. So thats where I'm at and if I could at least get a framework on where to begin i think I can get an understanding of what to do. Thank you!
Here are the 2 pictures of the question
https://drive.google.com/file/d/1HsOZVlg...sp=sharing
https://drive.google.com/file/d/1l6EfDYY...sp=sharing
Here is the link for the HW08data.txt file.
https://drive.google.com/file/d/1nvSuJpZ...sp=sharing
To begin, the HW08data.txt file. How can I get the file loaded into the program so I can assign the data to variables? Once I have the variables, which I believe is actually 16 points of (x,y) values. I know I need to run a while loop to calculate m for all 16 points and then use m to calculate r, this r value should be between 0 and 1. Once that value is calculated, I need to remove a point from the loop and recalculate r to see if it moves closer to 1, if it does I continue the loop up until it stops increasing closer to 1. So thats where I'm at and if I could at least get a framework on where to begin i think I can get an understanding of what to do. Thank you!
Here are the 2 pictures of the question
https://drive.google.com/file/d/1HsOZVlg...sp=sharing
https://drive.google.com/file/d/1l6EfDYY...sp=sharing
Here is the link for the HW08data.txt file.
https://drive.google.com/file/d/1nvSuJpZ...sp=sharing