Answer:
See explaination for program code.
Explanation:
inputFileName = input("Input filename: ") outputFileName = input("Output filename: ") inputFile = open(inputFileName, "r") outputFile = open(outputFileName, "w") count = 1 for line in inputFile: newLine = str(count).rjust(4, " ") + "> " + line outputFile.write(newLine) print(newLine) count += 1
Hard to see, if you make it normal size I might b able to help
Answer:
string1 = "this is string 1"
string2 = " this is string 2"
print(string1 + string2)
Explanation:
the string1 variable is assigned with a string value(aka. str)
string2 is also a variable assigned with a slightly different string value
the 3rd line then prints string 1 and 2 to the console.
Answer:
Binary numbers are expressed using only the digits 1 and 0. This is also referred to as base 2 notation.