Hi @Precious_usoroh.
We can’t tell you how to fix it because it is your assignment. Your code can run through but does not produce the correct result, so I would suggest you to follow this debugging tips to find out which line(s) of your code is wrong. Sometimes it is also good to take a break from it if you have spent long hours on the assignments.
Raymond
PS: Moved your thread to the right category, and modified the thread’s title.