Python Forum
What the butt is MyProgramming lab asking me to do?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What the butt is MyProgramming lab asking me to do?
#1
The problem states: "Assume that credits is an int variable whose value is 0 or positive. Write an expression whose value is "freshman" or "sophomore" or "junior" or "senior" based on the value of credits. In particular: if the value of credits is less than 30 the expression's value is "freshman"; 30-59 would be a "sophomore", 60-89 would be "junior" and 90 or more would be a "senior"."

I see that it's asking for an expression, but I have no idea what it wants me to put. The code I've found that works when assigning a value to "credits" is:

credits = 3

if credits <= 30:
    print("freshman")

elif credits >= 89:
    print("senior")


elif credits >= 60:
    print("junior")

elif credits >= 30:
    print ("sophomore")
>>> freshman

But MyPLab states that this is wrong. What the butt does it want from me
Reply


Messages In This Thread
What the butt is MyProgramming lab asking me to do? - by masonmoore93 - Oct-01-2017, 06:31 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020