tureeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Cd /path/to/source/directory
cp fileName /path/to/destination/directory
In Python, assume that a file containing a series of integers is named numbers.txt and exist on the computer's disk. Write a program that reads the entire numbers store in the file and calculates their total.
Here is what I have written but it does not run:
def. main():
out file=open('numbers.txt','r')
temp=outfile.readline()
total=0
while temp!='':
t=int(temp)
total=total+i
temp=outfile.readline()
outfile.close()
print('Total sum is:',total)
main()
Text file is a file named numbers.txt with the numbers 1-50 in it
Learn more:
- The sum of three consecutive integers is 186. what are the integers
brainly.com/question/1768254
Keywords: python, integers, computer, numbers, program
Answer:
The correct answer is d. Algorithms may be inefficient when used by a human brain.
Explanation:
This is a situation typical of algorithms, since in order for them to work perfectly, the participation of people who carry out the necessary tests is required for the new creation to be useful in a specific field. Algorithms are logical operations determined according to a pattern, but the functioning of the human brain is in many cases different from a simple algorithm, since it associates situations and, depending on their complexity, also solves them.