#sdpsgssolutions #read input on same line submit output # Open the input and output files. inputFile = open("filenamein3.txt", "r") outputFile = open("filenameout3.txt", "w") # Read one input myInput = inputFile.readline() x = int(myInput) # Calculations multiplyTwo = 2*x multiplyThree = 3*x # Write the answer to the output file (two outputs with line in between) outputFile.write(str(multiplyTwo)+'\n'+str(multiplyThree)) # Finally, close the input/output files. inputFile.close() outputFile.close()