#🔒 How do I use an if?
59 messages · Page 1 of 1 (latest)
@raw girder
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.
Generally:
if some condition here:
thing to do if it is true
else:
thing to do if it is false
You can omit the else: part.
So the condition will test something you're interested in.
What am I doing wrong here?
Ah, the test for equality is spelled == (2 equals) not =, which is for assignment.
Can you be more detailed?
It looks like some odd typing mode. Can you not just type the missing stuff out again?
I assume you cant run discord directly on that PC?
When I try to use “” I can’t get in between without deleting one of the “
I have discord on that pc
Try a left or right arrow key?
If you run discord there you can copy/paste the code as text, far better than a screenshot or photo.
So it just goes between the two “ and never goes in between
I’ll copy and paste
Discord is currently loading up
I'm still not sure what this means.
When I use left and right arrows and try to type something in I can never type in the space between the white bar only goes onto the “”
num1 = int(input("First number(s)"))
num2 = int(input("Second number(s)?"))
op = input("What are we doing?")
if op == ""
That’s the copy and paste
You can't just type if op == "+": ?
Is something autotyping the second quote or something?
I’ll just screen record it.
Do you have experience using medal?
No. What's that?
A recording app
Oh
Oh. Just type when the block is over the scond quote symbol.
What happens if you do that?
Oh. Maybe you're in some "overwirte" mod, instead of the more usualy "insert text" mode. Does pressing ESC turn off the block?
Me either.
Thanks!
Things working now? If statement ok?
@delicate iris How do I input a division symbol?
Just type a forward slash /
If you want the dot-above-and-blow-horizontal-line I'm not sure.
If you want the dotty thing in a line, try \U{DIVISION SIGN} in the string, eg:
"\U{DIVISION SIGN}"
Sorry, \N not \U
the N is for "name".
>>> "\N{DIVISION SIGN}"
'÷'
@raw girder ^
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.