#🔒 help

103 messages · Page 1 of 1 (latest)

surreal hingeBOT
#

@waxen mountain

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.

livid plank
#

You’re printing a hardcoded string and not the content of the variable

waxen mountain
#

im like

#

new new

#

to python

ruby mural
#

your for loop has a mistake, range(16), not range (16)

waxen mountain
livid plank
#

If you want to print the content of a variable you should pass to print function that variable

waxen mountain
#

whats a string if i may ask?

livid plank
#

Without quotes

ruby mural
#

also, you're printing "password" on every iteration instead of adding the randomly chosen character to the password string

waxen mountain
#

same

waxen mountain
livid plank
safe portal
livid plank
#

A sequence of characters

waxen mountain
#

holy shit im sorry i have dyslexia and so many people are typing 😭

ruby mural
waxen mountain
ruby mural
livid plank
unique dew
#

password is the variable , whole 'password' is a string of letters

waxen mountain
#

the inbetweens?

#

like this

unique dew
prime wharf
#

You’ve to remove the indent of line 11 and instead of printing just the raw string ‘“password”’, remove the quotes to get the actual value of the ‘password variable.

‘print(password)’

waxen mountain
#

ok

#

sec

ruby mural
#
password = "1234"
print(password) # password gets substituted for the value inside of it, so this is similar to print("1234")```
unique dew
#

!e

password = "1234"
print(password)
print("password")
surreal hingeBOT
ruby mural
waxen mountain
#

like

#

stacking up

unique dew
ruby mural
waxen mountain
unique dew
#

if you want it to print once you've to unindent it.

ruby mural
unique dew
livid plank
waxen mountain
ruby mural
waxen mountain
unique dew
livid plank
surreal hingeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

waxen mountain
unique dew
thorn coral
#

leave out the ' '

unique dew
#

You cannot expect to learn coding by doing random changes to code

#

Without understanding what they're doing.

ruby mural
# waxen mountain

almost there, I'll have you figure out the fix yourself, do you understand how to make for loops

livid plank
#

And especially forget TikTok to learn coding

waxen mountain
livid plank
ruby mural
#

you wanna add a randomly chosen character to the password string, then print the full result once

ruby mural
unique dew
waxen mountain
unique dew
#

If you don't understand what every line of your code is doing there's no point.

livid plank
thorn coral
waxen mountain
unique dew
#

You're not gonna learn by doing if you don't know theory at all.

thorn coral
unique dew
#

Follow One of The Resources Diligently in

#

!res

surreal hingeBOT
#
Resources

The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.

unique dew
#

Non structed learning won't help and you'll be more confused.

thorn coral
livid plank
prime wharf
unique dew
waxen mountain
#

i have 0 knowledge about any languages now what

livid plank
waxen mountain
kindred sphinx
waxen mountain
#

lowk both but python is the easiest one to start with right?

thorn coral
#

yes

kindred sphinx
#

btw have your focus more on the logic stuff in programming rather than the nuances of python

kindred sphinx
thorn coral
#

a password generator is a good beginner project.
you probably started learning python not too long ago. it is better to figure out stuff by yourself instead of directly asking for help.

livid plank
waxen mountain
#

!close

surreal hingeBOT
#
Python help channel closed with !close

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.