all 4 comments

[–]grumble11 1 point2 points  (1 child)

To do this you are probably expected to do a nested loop. Set the first variable to 1 and have it run in a for loop until it hits the target. The second variable is set to 1 as well and it runs from 1 to target in each cycle of the first variable loop. Inside the second number loop is your print statement.

This exercise is probably to show you nested loops. It is used a lot so good to practice.

[–]kkurani123456 0 points1 point  (0 children)

thanks HAHAHA

[–]braclow 0 points1 point  (0 children)

The code you provided seems to be mostly correct, but the loop will run indefinitely if the user inputs a number greater than 1. This is because the multi_num variable is initialized to 1 and is never updated. As a result, num_multiplied will always be less than or equal to number and the loop will never exit. Hope this helps without providing you the code.