Kofi is writing a Python program to calculate the total mass of a chemical mixture consisting of three compounds. His first draft of the program is shown below.
x = input("Enter mass of compound 1: ")
y = input("Enter mass of compound 2: ")
z = input("Enter mass of compound 3: ")
t = x + y + z
print("The total mass is: " + t)
State two ways that the maintainability of this program could be improved.
95 exam-style questions on OCR GCSE Computer Science Programming fundamentals. Each one has a worked solution and a mark scheme showing where the marks go.