#๐Ÿ”’ Help me with my homework

40 messages ยท Page 1 of 1 (latest)

valid bisonBOT
#

@latent oar

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.

#

Hey @latent oar!

It looks like you're trying to paste code into this channel.

Discord has support for Markdown, which allows you to post code with full syntax highlighting. Please use these whenever you paste code, as this helps improve the legibility and makes it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
latent oar
#
num = int(input("Please type in a number: "))
while True:
    if num == 1:
        print(num)
        break

    cnum = 2
    cnum2 = cnum - 1
    while cnum <= num:

        print(cnum)
        cnum += 2

        print(cnum2)
        cnum2 += 2
    if cnum == num:
        break
    elif cnum > num:
        print(num)
        break
#

Help pls

limber crater
latent oar
#

so basically when i input 6

#

the output is
2
1
4
3
6
5
6

#

there is a extra 6

#

cuz i put the print(num) at the bottom

#

but without that

limber crater
#

Ah you probably want to use range

latent oar
#

if i input 5
the output just
2
1
4
3

latent oar
limber crater
#

What's allowed?

latent oar
#

just use while loop

limber crater
#

Can you show the full rules?

latent oar
#

wdym the assignment?

#

rule?

limber crater
#

Yes

latent oar
#

well its allowed

#

it just i wanna try

#

with while loop

#

cuz i havent learned for loop

limber crater
#

No I mean what's the spec of the assignment, just paste it here

latent oar
limber crater
#

Yes, show more of the assignment prompt

#

In your screenshot include the whole app including title bar

latent oar
#

uhh well

#

its not rlly an assignment

#

it just a exercise.i found in website

#

so can u help me?

#

alright if for loops

#

how to do it?

#

nvm bro

#

thanks

#

i solved it

valid bisonBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.

#

๐Ÿ”’ Help me with my homework