Answer:
name = input("Enter your name: ")
books = int(input("Enter he number of books you purchased: "))
points = 0
if 1 <= books <= 3:
points = 5
elif 4 <= books <= 6:
points = 10
elif 7 <= books <= 8:
points = 15
elif books == 9:
points = 20
elif books >= 10:
points = 25
print(name + " has " + str(points) + " points")
Step-by-step explanation:
*The code is in Python.
Ask the user to enter the name and number of books purchased
Check the number of books purchased. Depending on the given conditions, set the points s/he earned.
Print the name and points s/he has