ternary

Converted the if statement to a ternary per assignment requirement.