Question: This is a Python Code question. I am trying to print a star pattern like shown below. I would like to print it using a
This is a Python Code question.
I am trying to print a star pattern like shown below. I would like to print it using a nested for loop.
A similar code in Javascript is shown below. However, I want to know the Python code to complete this in Python using nested for loops.
| for(i=1;i<=5;i++){ for(j=1;j<=i;j++){ document.writeln(*); } document.writeln( } J=1 j=2 j=3 j=4 j=5 I=1 * I=2 * * I=3 * * * I=4 * * * * I=5 * * * * * |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
