Discussions Events Study Material Jobs
Create a dictionary with keys as subjects and values as marks. Print marks for a given subject using Python - Uniwaly

Explore Diverse Conversations

Create a dictionary with keys as subjects and values as marks. Print marks for a given subject using Python

Posted By: UmairMehmood Published On: 13 June 2025 At: 08:07 AM
#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")

Tags:

python python dictionary python dictionary with keys
Login to like

Posted By:

Author Profile

UmairMehmood

11 days ago

Join the conversation!

Login to Comment

Discover More Articles

Government Announced Minimum Wages For Every Private and Government Employees. New Notification

University of Veterinary & Animal Sciences UVAS Swat

Punjab Danish School New Jobs 2025 - Non Academic Staff Required

فلم پی کے میں دکھایا گیا ایک سین حقیقت میں تبدیل

Personality development occurs in life but later years provides an opportunity for the modification of previously development trends. Discuss.

Chief Minister Punjab Wildlife Internship Program 2025

Basic Calculator with if elif Using Python

How to Attestation of Degrees/Diplomas/Certificates From HEC ?

Communication & Coordination Officer - The Urban Unit Jobs 2025

Field Manager - The Urban Unit Jobs 2025