Answer and explanation:
Here is code:
credit = int(input("Enter credits : "))
if credit < 7:
print("You are a Freshman")
elif credit >= 7 and credit < 16:
print("You are a Sophomore")
elif credit >= 16 and credit < 26:
print("You are a Junior")
elif credit >= 26:
print("You are a Senior")
Output: check image