Pattern Numbers and stars1

Can you see how to correct my code


updated with comments and added logic