Programming Examples
Python program to define a list of countries that are a member of BRICS Check whether a county is member of BRICS or not
Write a python program to define a list of countries that are a member of BRICS. Check whether a county is member of BRICS or not
Solution
country=["India", "Russia", "Srilanka", "China", "Brazil"]
is_member = input("Enter the name of the country: ")
if is_member in country:
print(is_member, " is the member of BRICS")
else:
print(is_member, " is not a member of BRICS")
Output
Enter the name of the country: India
India is the member of BRICS
----------------------------------------------
Enter the name of the country: Japan
Japan is not a member of BRICS