#๐Ÿ”’ Asterisk art only using while loops

16 messages ยท Page 1 of 1 (latest)

fierce pierBOT
#

@worldly linden

Python help channel opened

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.

sweet oasis
#

?

#

why delete pithink

worldly linden
#

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

autumn elbow
#

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

ripe sleet
ripe sleet
worldly linden
#

As in using a for loop or writing a while loop in terms of a for loop?

ripe sleet
#

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.

fierce pierBOT
#
Python help channel closed for inactivity

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.