#🔒 help
103 messages · Page 1 of 1 (latest)
@waxen mountain
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.
You’re printing a hardcoded string and not the content of the variable
uhh can u explain easier maybe?
im like
new new
to python
your for loop has a mistake, range(16), not range (16)
alr let me test
What I mean is that you called the function print and as argument you’re passing a string, specifically: password
If you want to print the content of a variable you should pass to print function that variable
whats a string if i may ask?
Without quotes
also, you're printing "password" on every iteration instead of adding the randomly chosen character to the password string
same
still dame
‘password’ is a string
they are correctly updating the variable, they're just printing the wrong thing
A sequence of characters
holy shit im sorry i have dyslexia and so many people are typing 😭
use print(password), remove the quotes
us quoetes the blanks?
wdym?
Explain why, not just give the answer
password is the variable , whole 'password' is a string of letters
basically ' '
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)’
password = "1234"
print(password) # password gets substituted for the value inside of it, so this is similar to print("1234")```
!e
password = "1234"
print(password)
print("password")
:white_check_mark: Your 3.14 eval job has completed with return code 0.
001 | 1234
002 | password
there you go!
You're printing it inside the for loop during each iteration
because your printing is part of the for loop, remove the leading spaces before the print line
wdym with loop
if you want it to print once you've to unindent it.
the blank spaces?
yep
Do you understand what you're writing?
From where you taken this code ?
nope, check that last line
tiktok but im just tryna learn by videos
Can you please atleast ask him if he understands before just telling him the solutions.
!res I suggest you to take a Python course from here
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
First learn what is a for loop you may check the resources
leave out the ' '
You cannot expect to learn coding by doing random changes to code
Without understanding what they're doing.
almost there, I'll have you figure out the fix yourself, do you understand how to make for loops
And especially forget TikTok to learn coding
i know like a little bit but im trying to learn by trying
It’s better to follow a proper course
you wanna add a randomly chosen character to the password string, then print the full result once
you're getting off topic
If you're trying to learn by trying know what the code is doing.
can u check pm rq
If you don't understand what every line of your code is doing there's no point.
I’m not going off topic since OP think to learn coding by viewing TikTok
you're missing indentation
whats indentarion if i may ask
That's why We're saying first learn the concepts
You're not gonna learn by doing if you don't know theory at all.
this is something you have to learn.
The Resources page on our website contains a list of hand-selected learning resources that we regularly recommend to both beginners and experts.
Non structed learning won't help and you'll be more confused.
watch a small tutorial on youtube on how to do some basic loops and you'll know what indentation is. takes only 5 mins
You wouldn’t understand our explanations since you have 0 knowledge about it
I’m mentioning you in the #python-discussion channel for resources
thx
Exactly, @waxen mountain do you know what's a string what's an integer , what are for loops?
chill bro im just fucking asking for help since im trying to learn bro
i have 0 knowledge about any languages now what
And we are giving you our help, we are saying to you to follow a proper course about programming in Python
alr u told me 5 times before i get it
you are trying to learn how to code or learn python?
lowk both but python is the easiest one to start with right?
yes
btw have your focus more on the logic stuff in programming rather than the nuances of python
wdym with nuances
Let's not overwhelm them
😭
What ?
you will know one day when coding in another language
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.
You could figure out stuff by yourself when you have at least a foundations knowledge
!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.