0

Need help ~ a printed pyramid

I need to know how to print a pyramid of ( * ) While the number you chose reflects the row’s.

30th Jul 2022, 2:13 PM
Bar Cohen
6 ответов
+ 2
Bar Cohen Use for loop and inner loop will depends on outer loop. Outer loop will print row and inner loop will print * in each row.
30th Jul 2022, 4:50 PM
A͢J
A͢J - avatar
+ 2
Alex For the new learner using loop is best practice as they don't know what how and where to use inbuilt functions/methods.
30th Jul 2022, 6:39 PM
A͢J
A͢J - avatar
0
No need for multiple loops A͢J 🫣 https://code.sololearn.com/cv3uGWsAG3u7/?ref=app Bar Cohen you should use multiple loops though. The reasoning behind such exercises is to learn them. Do you have an attempt to show? I'm sure people would help if you are stuck on a specific problem. "How to xyz" questions - without any thoughts put into the solution - are getting ignored. Which is good. This is a learning platform and no homework outsourcing platform.
30th Jul 2022, 6:10 PM
Alex
Alex - avatar
0
A͢J That's why I told him to use multiple loops. If he just copies my code and this is indeed a homework, then he'll have no fun explaining what his solution does, if his teacher asks him.
30th Jul 2022, 6:47 PM
Alex
Alex - avatar
0
Hey tnx guys, its a challenge my friend gave me, Iam a beginer and only use~ While , if and all the operators
31st Jul 2022, 12:41 PM
Bar Cohen
0
I am sure it’s easy but it got me confused haha, any way iwill try the double loops.
31st Jul 2022, 12:43 PM
Bar Cohen