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")
▶ RUN

Output/ Explanation:

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

Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad