How can I use a for loop inside an if condition? The condition is - If user input a value which is less than 10 then a list of 1-10 will be print : <p>The condition is - If user input a value which is less than 10 then a list of 1-10 will be print. </p>

<p>I am able to take the input but the condition and loop is not working.</p>
