I am doing a highschool python course and im having trouble importing a function from a different VS code tab using the import function.
First vscode tab:
from name_function import get_formatted_location
print("Say 'q' at any time to quit.")
while True:
city = input("nPlease Give me your city name: ")
if city == 'q':
break
country = input("nPlease give me your country name: ")
if country == 'q':
break
formatted_location = get_formatted_location(city, country)
print("tFormatted location: " + formatted_location + '.')
Second vscode tab:
def get_formatted_location(city, country):
full_location = city + ' ' + country
return full_location.title()
I made sure that everything was named correctly and there were no typos. Not sure what else the problem could be.
5