#๐Ÿ”’ Could anyone help with my python homework pleaseeee

14 messages ยท Page 1 of 1 (latest)

jovial bladeBOT
#

@mighty bramble

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.

mighty bramble
#

I don't know how to do starting in vpl2

main lodge
mighty bramble
#

this t5_vpl_2

#

I asked chatgpt but still wrong

main lodge
#

What code do you have so far?

mighty bramble
#
print(
def printPattern(pattern, size):
    if pattern == 'a':
        for i in range(size):
            if i == 0 or i == size - 1:
                print('#' * size)
            else:
                print('#' + ' ' * (size - 2) + '#')
    elif pattern == 'b':
        for i in range(size):
            print(' ' * i + '#')
    elif pattern == 'c':
        for i in range(size):
            print(' ' * (size - i - 1) + '#')
    elif pattern == 'd':
        for i in range(size):
            if i == 0 or i == size - 1:
                print('#' * size)
            else:
                print('#' + ' ' * (i - 1) + '#')

# Example usage:
if __name__ == "__main__":
    pattern = input().strip()
    size = int(input())
    printPattern(pattern, size))
```py
main lodge
#

Follow the instructions from the bot

golden beacon
#

First 3

mighty bramble
jovial bladeBOT
#
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.