+ 2

Please send me a Python code with this output(for loop)

* ** *** **** ***** etc

16th Aug 2018, 6:54 AM
Kondwani Mwape
Kondwani Mwape - avatar
18 Respostas
16th Aug 2018, 7:58 AM
Ishaan Yadav
Ishaan Yadav - avatar
+ 3
Please send us your attempt at solving this problem by providing a link to your Code Playground project in this thread so we can help you fix it.
16th Aug 2018, 7:08 AM
Janning⭐
Janning⭐ - avatar
16th Aug 2018, 7:49 AM
Kondwani Mwape
Kondwani Mwape - avatar
+ 2
Arthur thanks for the advices (sorry ive started programming five days ago and il still a noob)❤️
16th Aug 2018, 1:12 PM
Marse
Marse - avatar
+ 2
ok cool. good talk guys. :)
18th Aug 2018, 2:44 AM
Janning⭐
Janning⭐ - avatar
+ 1
sily mistake
16th Aug 2018, 8:25 AM
Kondwani Mwape
Kondwani Mwape - avatar
+ 1
lol
16th Aug 2018, 5:16 PM
Kondwani Mwape
Kondwani Mwape - avatar
+ 1
Can we do a sort of time out guys? For what it's worth: https://www.codecademy.com/en/forum_questions/5553df3ad3292f9fd00002f2 If we were to just zoom out a bit, I think we'll find that if latency (to that degree) is a concern, you will want to use a lower level language (like C). Python is great for readability and is very suitable as an introductory programming language. Let's not overwhelm the poor newbie with nuanced information that isn't important yet. Save the advanced discussion topics for the advanced students.
18th Aug 2018, 2:08 AM
Janning⭐
Janning⭐ - avatar
+ 1
Markus Kaleton Thank you Janning⭐ , thats what i am talking about
18th Aug 2018, 2:34 AM
I Am Arthur
I Am Arthur - avatar
0
yeah just the indent
16th Aug 2018, 11:53 AM
Ishaan Yadav
Ishaan Yadav - avatar
0
It works
16th Aug 2018, 12:50 PM
Marse
Marse - avatar
0
Marse With the for loop its more efficient , ad get less lines
16th Aug 2018, 12:57 PM
I Am Arthur
I Am Arthur - avatar
0
Marse and its not "+", its with "*"
16th Aug 2018, 12:59 PM
I Am Arthur
I Am Arthur - avatar
0
doesn't really matter what type of loop you use for this, nothing to do with efficiency. Getting stuck in a for loop prison where you dont know when to use it and when not to, might end up being a problem star = "*" while len(star) < 7: print(star) star += "*"
16th Aug 2018, 6:12 PM
Markus Kaleton
Markus Kaleton - avatar
0
Markus Kaleton Less lines are faster , simpler and cost less time,more efficient, isnt it?..You made a infinity one, time limit will exceed
16th Aug 2018, 9:27 PM
I Am Arthur
I Am Arthur - avatar
0
Arthur I ran both codes on several test runs with 30k stars and both give really similar results. (didn't log these or make average counts since im sitting in a car)
17th Aug 2018, 4:29 PM
Markus Kaleton
Markus Kaleton - avatar
0
Markus Kaleton Ok, similar, know put like 20 of then.Its still not similar, so the one with for is more efficient, in a big code its better to do with for, i am saying to Marse which is better because he will need to know when he will make a big code and he want to make it faster
17th Aug 2018, 10:35 PM
I Am Arthur
I Am Arthur - avatar
- 1
i = "*" while 1 == 1: print(i) i=i+"*" if i == "****************************": break
16th Aug 2018, 12:50 PM
Marse
Marse - avatar