By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!# User input program.
Employee_Name = input("Please insert the name of the employee: ")
Employee_Years = input("Please insert how many years of experience the employee has: ")
Employee_Years = int(Employee_Years) # Treat the Employee_Years variable as an integer value.
print("Employee Name: " + Employee_Name)
# Note: Use str() in this print statement to convert it back to a string.
print("Employee Experience: " + str(Employee_Years) + " years")
# Check to see if the employee is eligible.
if Employee_Years >= 2:
print("You're eligible.")
else:
print("Sorry, but you aren't eligible.") File Edit Options Buffers Tools Python Help
# User input program.
Employee_Name = input("Please insert the name of the employee: ")
Employee_Years = input("Please insert how many years of experience the employee has: ")
Employee_Years = int(Employee_Years) # Treat the Employee_Years variable as an integer value.
print("Employee Name: " + Employee_Name)
# Note: Use str() in this print statement to convert it back to a string.
print("Employee Experience: " + str(Employee_Years) + " years")
# Check to see if the employee is eligible.
if Employee_Years >= 2:
print("You're eligible.")
else:
print("Sorry, but you aren't eligible.")
thank you!Hi there! Welcome to Code Forum!
I’m not too family with Python but let’s find out together! So from what I read you need some sort of listener or input then you will need a variable to store that information. Then throw it through an if statement which will then display if the person is eligible for EI.
Code Forum is a community platform where coding enthusiasts can connect with other developers, engage in discussions, ask for help, and share their knowledge with a supportive community. It's a perfect place to improve your coding skills and to find a community of like-minded individuals who share your passion for coding.
We use essential cookies to make this site work, and optional cookies to enhance your experience.