We have a dictionary with countries and languages in that countries. Search the language received from the user input in the countries. Return a list of countries where the language is spoken. If you can't find the language, return No such country.
Index() and in under the hood
Find the language
Report a typo
Sample Input 1:
EnglishSample Output 1:
['Iceland', 'Monaco']Sample Input 2:
BulgarianSample Output 2:
No such countryWrite a program in Python 3
# Do not change the dictionary, please
countries = {
"Andorra": {"Catalan", "French", "Portuguese"},
"Iceland": {"Icelandic", "English", "Scots"},
"Monaco": {"French", "Italian", "English"},
"Belgium": {"Dutch", "French", "German"},
}
def check_language(lang):
# Write code here
language = input()
# Print the result
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.