#๐Ÿ”’ what is wrong? im new..

27 messages ยท Page 1 of 1 (latest)

dusk vectorBOT
#

@rugged karma

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.

rugged karma
#

oh sorry

#

wait lemme copy pand paste the code

#

names_list = []
people = 0
persons = int(input('how many people would you like to invite?:'))
while persons != people:
names = input('type in the names of the people.: ')
names_list.append(names)
print(names_list)

dusk vectorBOT
#

Hey @rugged karma!

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.
pastel condor
#

formatedpy names_list = [] people = 0 persons = int(input('how many people would you like to invite?:')) while persons != people: names = input('type in the names of the people.: ') names_list.append(names) print(names_list)

#

you dont increment people so it gets stuck in a infinite loop
and you didnt use .split() on names

#

!epy names_list = [] names = "Ben Alice Tom Luka MellowSatella" names_list.append(names) print(names_list) #above is your code, notice how in the print its just 1 thing in the list with all the names

dusk vectorBOT
pastel condor
#

!epy names_list = [] names = "Ben Alice Tom Luka MellowSatella" names_list.extend(names.split(" ")) #.split(" ") splits the string at spaces and returns a list #.extent just extends the list, if you wouldn't do this then you would have a list inside of a list [["Ben", "Alice"...]] print(names_list)

dusk vectorBOT
rugged karma
#

thank you :]] very much

pastel condor
#

no problem

rugged karma
#

sorryyy it seems basicc

pastel condor
#

if you have any more questions feel free to message me

pastel condor
rugged karma
#

oh ofc!

#

yeahhhh...

#

i use the book python by exapmle

pastel condor
#

i didnt use a book to learn

#

i just watched a lot of yt videos and tried to write code

rugged karma
#

okkk

pseudo parrot
#

i always learn programming languages with a book. a book is definetly a good way

#

but of course doing a lot of programming by yourself is the key

pastel condor
#

i struggle with a lot of fonts
so i cant read books, thats why i watched yt to learn

dusk vectorBOT
#
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.