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

CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad