#πŸ”’ helping with if Prints error

23 messages Β· Page 1 of 1 (latest)

open raven
#

Hello sorry again for being an inconvenience I finished some parts of my code and I'm making a text and call option and when I hit type in text it does call first and then goes to text and I don't know why this Error is happening
I'm trying my best to figure it out but I'm coming up nothing

""
Py
Contacts=['jack','megan','cotten]
if sub_search_contacts in contacts :
time.sleep(1)
print("call \n\ntext\n")
sub_search_text=input("would like to call or text \n")
if sub_search_text=='call' :
time.sleep
print("calling...")
If sub_search_text=='text' :
time.sleep(1)
print("loading text...")
""""
Does anyone know how I could work and make it so that just prints text and doesn't go to calling cuz both are if statements

uneven mangoBOT
#

@open raven

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.

open raven
#

""
Py
Contacts=['jack','megan','cotten]
if sub_search_contacts in contacts :
time.sleep(1)
print("call \n\ntext\n")
sub_search_text=input("would like to call or text \n")
if sub_search_text=='call' :
time.sleep
print("calling...")
If sub_search_text=='text' :
time.sleep(1)
print("loading text...")
""""

#

@uneven mango

#

@uneven mango !/

young ridge
#

!code

uneven mangoBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

open raven
#

!code
"""Py
Contacts=['jack','megan','cotten]
if sub_search_contacts in contacts :
time.sleep(1)
print("call \n\ntext\n")
sub_search_text=input("would like to call or text \n")
if sub_search_text=='call' :
time.sleep
print("calling...")
If sub_search_text=='text' :
time.sleep(1)
print("loading text...")
""""

restive linden
#

thats not how you do it

young ridge
restive linden
#

```py
type something
```

open raven
#

Sorry

restive linden
open raven
#

I checked over my code multiple times and I don't really see anything wrong with it when I want it to do is be able to go from if I were to type text into the thing I don't want it to have to go through call to get to text

young ridge
#

you forgot closing quotes after 'cotten

#

In line 1 Contacts is capitalized but in line 2 contacts is all lowercase

open raven
#

Well that was just an example and I'm having trouble trying to make it so that calling doesn't come up before text I want that as its own separate function well separate in the way that it won't come up if I take texting sorry @young ridge

open raven
uneven mangoBOT
#
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.