#๐ Asterisk art only using while loops
16 messages ยท Page 1 of 1 (latest)
@worldly linden
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.
just only read the message that its not supposed to be an ss lol
plus I actually dont have code yet
but pretty much I need help with this question: Pyramid
Task
Standard input consists of a single, odd positive number n.
Write a python script named exf-pyramid.py which writes a pyramid of height n (on its side) to standard output.
Example standard input
7
Example standard output
*
*
*
*
*
*
*
*
*
*
*
*
*
and I cant use for loops, any python specific functions
just while loops
Are we supposed to help people with school assignement in this server ?
Anyway, remember than a for is nothing more than a while but automatically calculating the next value. You can compute it yourself to make something like a for but with a while
Sure. We just don't do the assignment for them, just help them do it.
Can you write a for-loop for the first part? The asterisks moving right? Then we can translate it to a while.
As in using a for loop or writing a while loop in terms of a for loop?
Whichever. Your assignment requires a while loop. You could do that directly, or write a for-loop and then turn it into a while loop.
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.
