#๐ Output terminal wont work properly
29 messages ยท Page 1 of 1 (latest)
@keen flume
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
for i in range(1, n + 1):
for j in range(1, i + 1):
print("* ", end="")
print("")
# Example: Print a half pyramid with 5 rows
n = 5
half_pyramid(n)
Hey @keen flume!
Add a py after the three backticks.
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
this is the code
thats literally a google searched code when mine didnt work
but it still wont work
!e```py
def half_pyramid(n):
for i in range(1, n + 1):
for j in range(1, i + 1):
print("* ", end="")
print("")
Example: Print a half pyramid with 5 rows
n = 5
half_pyramid(n)```
:white_check_mark: Your 3.12 eval job has completed with return code 0.
001 | *
002 | * *
003 | * * *
004 | * * * *
005 | * * * * *
make sure you saved the file
it seems to work fine
i did save it
That seems like you're using the wrong tab, it should say "TERMINAL" instead of "OUTPUT". I don't know if that would've changed the output but wanted to mention it
are you running the correct file?
yep
can you try running it directly from the terminal instead of the shortcut?
how do i do that?
oh shit
it works
i pressed the run button from top left
but how did that shortcut affect the code
?
wait, now even the short cut button works, but it still runs in the output tab
weird
well, thanks yall
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.