Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique.

 Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and  User Keys as their Name Assume That  The Names Are Unique.

Code:

FavLang = {}
a = input("Enter your Favorite Language Raka : \n ")
b = input("Enter your Favorite Language Rama : \n ")
c = input("Enter your Favorite Language Raaj : \n ")
d = input("Enter your Favorite Language Raja : \n ")

FavLang["Raja"] = d
FavLang["Raka"] = a
FavLang["Rama"] = b
FavLang["Raaj"] = c
print(FavLang)

Output:

Enter your Favorite Language Raka : 

 Python

Enter your Favorite Language Rama : 

 C

Enter your Favorite Language Raaj : 

 C#

Enter your Favorite Language Raja : 

 Java

{'Raja': 'Java', 'Raka': 'Python', 'Rama': 'C', 'Raaj': 'C#'}


Download Code

Comments

Popular posts from this blog

Write Python Program To Store Seven Fruits Name In a List Enter By The User