Answer:
# create the file
filename = "Testfile.txt"
# for writing, we create the output file:
outPutfile = open(filename, "w")
# Writing numbers from 1-100
for item in range(1,101):
outPutfile.write((str)(item))
outPutfile.close()
# printing the contents to verify it worked correctly
infile = open(filename, "r") #note the "r" indicates the mode
fileContents = infile.read()
infile.close()
print(fileContents)
Explanation:
- Define the working file fileName = TestFile
- Create the output file for writting outPutfile = open(filename, "w")
- Use a for loop to write numbers from 1-100 to the file outPutfile.write((str)(item))
- Close the file outPutfile.close()
- You may open the file read its content and print the contents to verify it worked correctly
Please find the answers in attached file.
Knowledge...- software QA engineer
Master’s...- business analyst
course...- network and computer admin
training...- multimedia artist
Give the type and value of each result of the following Java expressions. a. (5 / 2) * 2.0 type is float value is 4.0 b. (5/2.0) * 2 type is integer value is 5c. "1.3" + "5.2" type is string value is 1.35.2d. 1 + 7.0 + "2" + "x" this will produce an error because we cannot add variables of different type
Answer:
A) a device that sends data to the receiving device
Explanation: