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

Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad