12 AnswersNew Answer
Frogged kannst Du gerne haben: [𝚙𝚛𝚒𝚗𝚝((5-𝚊𝚋𝚜(𝚒))*'*') 𝚏𝚘𝚛 𝚒 𝚒𝚗 𝚛𝚊𝚗𝚐𝚎(-4,5)]
Wow, Jan Markus. Nice one-liner used 🤩🤩
AKSHAY🇮🇳 [INACTIVE] Android App: "Stylish Text" Font number: 116 On Windows-Systems it is often called "Courier". In the Android-app the fonts have no names.
Jan Markus nice... But his teacher will smell the Braten and then...😤😤😤 Trotzdem....wirklich hübsch.
Finally....one loop for each row and the nested one for the cols like Adam Riese would have told us if he was born a bit later. Concerning the ranges ....Jan Markus did the work for u.
This is solved using nested loops. Try to think for the logic before solving the question. https://code.sololearn.com/cvBhhg516Ihy/?ref=app
First of all, have you tried your best, before posting this question. Because you won't be able to learn programming if you ask others for direct answers of these questions. I know it might appear like a lecture to you, but this is the way everyone learns Programming, even if you aren't able to find the correct answer, your time spent on thinking will not go waste, it will develop your logic and will force your brain to adapt to new requirements. Atleast put your code where you have tried to solve it, in this way we can hint you about the mistakes that you are making. At that point if you are making any small mistake, we can simply tell you the answer. But if you don't understand the logic behind it and are simply trying to take shortcut, then it will be a big hurdle in your growth.
I can do it even without nested loops within an oneliner. 🤔 Or does your teacher insist on using nested loops?
Try it like this: n = 5 for i in range (1, n + 1): for j in range (1, i + 1): print ('*', end = '') print() for i in range (n, 0, -1): for j in range (1, i + 1): print ('*', end = '') print()
Jan Markus which font did you used to write code??
Jan Markus zeig mal den oneliner...
hi for 𝚒 in 𝚛𝚊𝚗𝚐𝚎(-4,5): if i<0: print((5-(-1*𝚒))*'*') else: print((5-(𝚒))*'*')