I wrote this simple program that I called years of service in python to show how to use if else if statement. I hope you will find my work useful.
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Program Listing
# Mr. Jake Rodriguez Pomperada, MAED-IT, MIT
# www.jakerpomperada.com www.jakerpomperada.blogspot.com
# jakerpomperada@gmail.com
# February 23, 2021
# Bacolod City, Negros Occidental
print()
print("\tYEARS OF SERVICE IN PYTHON");
print()
years = int(input("Enter years of service: "))
office = str(input("Enter office: "))
if years >= 10:
if office.upper() == "IT":
print(f"Amount Given: 10000")
elif office.upper() == "ACCT":
print(f"Amount Given: 12000")
elif office.upper() == "HR":
print(f"Amount Given: 15000")
elif years < 10:
if office.upper() == "IT":
print(f"Amount Given: 5000")
elif office.upper() == "ACCT":
print(f"Amount Given: 6000")
elif office.upper() == "HR":
print(f"Amount Given: 7500")
print()
print("\tEND OF PROGRAM");
print()
No comments:
Post a Comment