A program is needed that must meet the following requirements:
'Out of range' if the input is outside the permitted range. You can assume only numeric inputs will be entered' is a multiple of 5', if the number is divisible by 5' is not a multiple of 5', if the number is not divisible by 5.Here is the current, buggy version of the Python code:
score = input("Enter a score: ")
if score < 10 and score > 50:
print("Out of range")
if score % 5 == 0:
print(score + " is a multiple of 5")
else:
print(score + " is not a multiple of 5")
Amend the code to:
print statements so that the input number is correctly concatenated or formatted in the output text.Do not add any additional functionality or validation.
51 exam-style questions on Edexcel GCSE Computer Science Develop code, covering Decomposition and abstraction to solve problems, Read, write, analyse and refine programs, Converting algorithms into programs, Techniques for readable, maintainable code, Identifying and correcting program errors, and Evaluating program fitness and efficiency. Each one has a worked solution and a mark scheme showing where the marks go.