# Tag Info

### pset6 mario.py more

First of all, chill out man! Programming should be fun, not stressful! It's like solving a mystery, not having exams! :D Anyway your mistake is quite silly (I think it's due to the lack of sleep :P). ...
• 7,396
1 vote
Accepted

### Struggling to align pyramid and check for extra spaces at the end of each line in pset6 mario.py less

Don't make things complicated. for x in range (height): print((height-x - 1)*' ' + (x+1)*'#')
• 731
1 vote
Accepted

### why is there a blank line after input?

Your first line printed has i being 0, so you print spaces only. Change to range(1, n + 1) to avoid that. BTW, you should not print spaces at the end of the line. As much as I like the symmetry, the ...
• 21k
1 vote
Accepted

### pset6 - mario more - check50 EOF error

0 and 23 are valid input values. By using >0 and <23 you exclude them. Use >= and <=.
• 21k
1 vote

### Simple Python Loop Not Working

The problem was in logic: The loop wasn't actually breaking when I put in a correct value (between 0 and 23) hence the infinite loop, as the logic said for it to break only if it was less or greater. ...
• 113
1 vote

### How do I add a condition to a for() loop in Python?

You could use while and somewhat emulate for, or do an if with a break inside your loop (which I would prefer).
• 21k
1 vote
Accepted

### cs50 2017 pset6 - mario.py code not working

First: DO NOT POST CODE AS IMAGES. Post as text, there's a {} button in the editor you can click after selecting the code, which will add four spaces in the front, which tell markdown to format as ...
• 21k
1 vote
Accepted

### CS50 2017 ProblemSet6 Mario.py

Python is very nitâ€“picking about how you indent your code. In your case, the break should have 8 more spaces before it. return n should have 4 more. Like bellow: import cs50 def main(): height = ...
• 7,396

Only top scored, non community-wiki answers of a minimum length are eligible