Re: Nested Loop Code Help

2020-01-26 Thread DL Neil via Python-list
On 27/01/20 1:53 PM, Richard Damon wrote: On 1/26/20 6:52 PM, DL Neil via Python-list wrote: On 27/01/20 4:15 AM, ferzan saglam wrote: Hello people, I have written the code below which works fine, but it has one small problem. Instead of printing one (x) on the first line, it prints two. I

Re: Nested Loop Code Help

2020-01-26 Thread Richard Damon
On 1/26/20 6:52 PM, DL Neil via Python-list wrote: On 27/01/20 4:15 AM, ferzan saglam wrote: Hello people, I have written the code below which works fine, but it has one small problem. Instead of printing one (x) on the first line, it prints two. I have tried everything in my knowledge, but

Re: Nested Loop Code Help

2020-01-26 Thread DL Neil via Python-list
On 27/01/20 4:15 AM, ferzan saglam wrote: Hello people, I have written the code below which works fine, but it has one small problem. Instead of printing one (x) on the first line, it prints two. I have tried everything in my knowledge, but cannot fix the problem. Thanks for any help in

Re: Nested Loop Code Help

2020-01-26 Thread Richard Damon
On 1/26/20 6:11 PM, Greg Ewing wrote: On 27/01/20 4:15 am, ferzan saglam wrote: for x in range ( 0, 10):    stars = 'x'    count = 0 By the way, this 'for' loop is unnecessary. The end result is just to give initial values to three names. You don't need a loop at all for that, just three

Re: Nested Loop Code Help

2020-01-26 Thread Greg Ewing
On 27/01/20 4:15 am, ferzan saglam wrote: for x in range ( 0, 10): stars = 'x' count = 0 By the way, this 'for' loop is unnecessary. The end result is just to give initial values to three names. You don't need a loop at all for that, just three assignment statements.

Re: Nested Loop Code Help

2020-01-26 Thread Richard Damon
On 1/26/20 10:15 AM, ferzan saglam wrote: Hello people, I have written the code below which works fine, but it has one small problem. Instead of printing one (x) on the first line, it prints two. I have tried everything in my knowledge, but cannot fix the problem. Thanks for any help in

Re: Nested Loop Code Help

2020-01-26 Thread ferzan saglam
On Sunday, January 26, 2020 at 3:26:40 PM UTC, Dan Purgert wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > ferzan saglam wrote: > > Hello people, I have written the code below which works fine, but it > > has one small problem. Instead of printing one (x) on the first line, > > it

Re: Nested Loop Code Help

2020-01-26 Thread Dan Purgert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 ferzan saglam wrote: > Hello people, I have written the code below which works fine, but it > has one small problem. Instead of printing one (x) on the first line, > it prints two. > I have tried everything in my knowledge, but cannot fix the

Nested Loop Code Help

2020-01-26 Thread ferzan saglam
Hello people, I have written the code below which works fine, but it has one small problem. Instead of printing one (x) on the first line, it prints two. I have tried everything in my knowledge, but cannot fix the problem. Thanks for any help in advance. for x in range ( 0, 10):