I am not an expert of defining function but I would need to create a new one.
I have one function
- where I enter manually a query;
- where I set parameters like language and country;
- then the last function where I should pass all these parameters as fields.
Since the functions that I am using are too big to be reported here, I will give you an example:
def fun1():
query=input("Enter query:")
return (query)
def fun2():
country=input("Enter country:")
language=input("Enter language:")
return(country, language)
def fun3():
fun1()
fun2()
print("Country: You have selected ",country)
print("Language: You have selected ", language)
print("Query: You have selected ", query)
This does not recognise country, language and query from the previous functions. Can you explain me how to correctly define the last functions in order to use the parameters previously set?