+ 2
Can someone tell me why this doesnt work??
SOURCE CODE AT BOTTOM I'm using qpython and they have a module for doing things on your android and this one gives you a window with a question and I want it to be a yes or no. The problem is is that I can only use the ttsSpeak() with one phrase. If I go lemon = droid.ttsSpeak("hi") #and lime = droid.ttsSpeak("bye") print(lemon) print(lime) It will just say "hi" "bye" I'm trying to get either hi or bye, not both... can someone help? import androidhelper droid = androidhelper.Android() droid.makeToast("hello") answer = droid.dialogGetInput("TTS", "will anyone help you?").result responseOne = droid.ttsSpeak("I need help, sad face") responseTwo = droid.ttsSpeak("yay") if answer == "no": print(responseOne) else: print(responseTwo)
4 Respostas
+ 1
What are you trying to achieve?
+ 1
It looks like the program just does what it is supposed to do...
You need some input that toggles what should be output. And an evaluation of conditions that trigger lemon juice...
0
I want to be able to type either yes or no in the box that pops up and either have my phone audibly say "I need help" or "yay"
I cannot seperate the first droid.ttsSpeak from the second. All it does is say the first droid.ttsSpeak and then it says the second right after. Idk if this makes sense but its incredibly frustrating.
I want responseOne to work only with no
And responseTwo only to work with yes
I thought that if I put droid.ttsSpeak into 2 different variables i could call them separately but it calls them both. How can I seperate ("I need help")
From ("yay)?
Sorry I just dont know how to articulate this
0
That is a sample portion of the code. The code does work but if I print lime and print lemon it will say hi and bye at the same time. That's the problem I'm having. I just want hi if I print lemon not both