No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
If I have a list and I already have split the line in the file. I also have figured out the code to average the numbers in the list now I have want to figure out a way to somehow take the average from the list of numbers and give … |
|
Say that you have a file and the list of numbers like 10 20 16 17 82 93 87 How could I add/subtract/ or multiply these individually? |
|
Convert the following code to a for loop while (b < a) : b = b + 1 print b |
|
When you have a file with a lot of lines of numbers. I want to know if instead of writing the formula to calculate the numbers for everyline of data. Is there a way to tell it to apply the formula I have made to every line until there are … |
|
out = open ("output.jh") towrite= a+b out.write (towrite) When you want to put an output to a file. instead of the information going right next to eachother how could they go one over the other in the file. This would be for many different outputs. |
|
A file called input. john 9 7 6 7 4 3 9 5(double space)76 54 53 77 65(double space)4 45 45 def main(): fin = open ("input", "r") line = fin.readline() x = line.split(" ") a= (int (x [1])+ int (x [2]) +int (x [3])+ int (x [4]) +int (x … |
|
How to convert numbers from a file into integers the numbers in the file are alerady split but they are strings. Doesnt anyone know how to convert them to integers so they can be manipulated as numbers. |
|
How to make a program in python to do this? 20% of the score comes from the average of 8 Quizzes (each has maximum of 10 points) 20% of the score comes from the average of 2 exams (each has maximum of 100 points) 40% of the score comes from … |