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:
A) Like "9?????????"
Explanation:
Required
10 characters and starts with 9
<em>The options relate to queries in Microsoft Access; so, I will answer the question from the perspective of Microsoft Access.</em>
First, the query will use the like statement because the query is to make comparison.
Next; for the search query to return exact 10 characters, the syntax is "??????????"
Lastly, for the search query to begin with 9, the first ? will be replaced with 9.
So, we have: "9?????????"
<em>Hence, (a) is correct</em>
Answer:
Moving Picture Experts Group
Explanation:
Attackers will initially attempt to find an IP address within the network that can be used to stage an attack. Hope this helps!
Answer:
I'm sorry but I don't think there is a way. You should try to get the password out of him and then close it. Don't forget to clear the history.
Explanation: