so here ı am trying to learn modules in python ı am creating a greeting message but it keeps giving me an expression eror even though it doesnt seem to haveyour text
any mistakes(names are a bit stupid but still)
from nabercanokolpacino import nabero
from bye import oldcustomer
print("are you new here?(answer yes or no)")
x=input(">>")
if x=="yes":{
global o
o = input("name:");
nabero(o)
}
elif x=="no":{
oldcustomer()
}
as you can see above this should be printing me some stuff inside a function from nabercanokolpacino and bye if ı said yes or no but its nowt working because of the expession error
3
Answers
Remove the curly brackets.
There are many errors in your code, hover the mouse over the red line to see the error message.
Simple modified code:
Also make sure to use a python interpreter with
nabercanokolpacino
andbye
installed.You need to install the extension python.
https://code.visualstudio.com/docs/python/python-tutorial
There are a lot of syntax mistakes in your code. Your need to remove the curly braces. Modified code:
Now you need to make sure that you have installed the nabercanokolpacino and oldcustomer modules to your Python interpreter.