Monday, February 9, 2026

 Python

Conditions

IT = ["Tech Support", "Development", "QA"]
Healthcare = ("Doctor", "Nurse", "Attender")

profession = input("Enter your profession:")

if profession in IT:
print(f" {profession} in IT")
elif (profession in Healthcare):
print(f" {profession} in healthcare")
else:
print("Profession not found")

Output
Enter your profession:Doctor
 Doctor in healthcare

No comments:

Post a Comment

Python Passing arguments through function using args and kwargs args take non keyworded arguments, while kwargs take keyworded arguments. de...