#enter Camel case to see output
marks = {
"Math" : 95,
"English" : 88,
"Urdu" : 67,
"Science" : 98,
}
while True:
subject = input("Enter Subject to get marks")
if subject in marks:
print(f"marks of {subject} ", marks[subject])
else:
print("Not Found")
Create a dictionary with keys as subjects and values as marks. Print marks for a given subject using Python
Login to like
Posted By:

UmairMehmood
11 days ago
Join the conversation!
Login to Comment