qpython-android / qpython

QPython is an Android Python engine primarily designed for Python and AI learners. It offers a range of impressive features to enhance Python programming experience.
https://www.qpython.org
1.03k stars 191 forks source link

Qpython3- Syntax Error- Help #181

Closed ttuske closed 4 years ago

ttuske commented 4 years ago

Hey All, I have this code, it works fine when I run it on my computer. I copied it over to my phone to use in Qpython3. When I try to run it i get a "SyntaxError: invalid character in identifier 1 | : / $" for line 21: user_input = input(">") the error appears to direct to the "t" of user_input. What am I doing wrong?

import random
#last update 1/16/2020
#Each lists include resturants with that that city, national fastfood chains, or type of food if city is not applicable.

conway_food =["Denny's", "Pizza Ranch", "Golden Corral", "Hideaway Pizza","Taqueria Gonzales","TGI Fridays","JJ's Grill","On The Border","Taziki's","U.S. Pizza","Red Robin","Old Chicago","La Heurta", "Smitty's BBQ","China Town","MarketPlace Grill","Hog Pen BBQ","Outback Steakhouse","Stoby's","Whole Hog Cafe","Cracker Barrel","Purple Cow","Chili's","Buffalo Wild Wings","Tio's","Serrano's","Pasta Grill","Mulan's","WunderHaus","Newk's","Blaze Pizza","Larry's Pizza","New China","Logan's Roadhouse","HOME and COOK"]

hot_springs_food = ["BWW", "Bubba Brew's", "Salsa's"]

russellville_food = ["Waffle House","Fat Daddy's","WhattaBurger"]

fast_food = ["McDonald's","Burger King","Taco Bell", "Taco Beuno","Subway", "Chick-fil-a","Steak & Shake"]

other_food = ["Mexican", "Burgers","Itallian"]

print("Hello, Where would you like to eat?")
print(' hint:Input a City or type "Fast Food" ')

while True:
    user_input = input(">")
    if user_input == "exit":
        print("ENJOY!")
        break

    elif user_input == "Conway":
        conway = random.choice(conway_food)
        print("You should go to: " + conway)

    elif user_input == "Hot Springs":
        hot_springs = random.choice(hot_springs_food)
        print("You should go to: " + hot_springs)

    elif user_input == "Russellville":
        russellville = random.choice(russellville_food)
        print("You should go to: " + russellville)

    elif user_input == "Fast Food":
        fast=random.choice(fast_food)
        print("You should go to:"+ fast)

    else:
        other = random.choice(other_food)
        print("You should get: " + other)
ttuske commented 4 years ago

Phone: Samsung Galaxy S10+ OS: Android 10 Qpython3 downloaded from Google Play Store

riverfor commented 4 years ago

Hello, do you mind post this question within stack overflow please, I will take a deep look into it later. https://stackoverflow.com/questions/tagged/qpython ?

I guess there maybe some problem when you copied it over to your phone .