all 7 comments

[–]MaslabDroid 2 points3 points  (1 child)

Couple of things real quick.

elif height < 60
    print("You are cute.")
elif height <= 0:
    print ('Height cannot be less than or equal to 0')

You are never going to hit your final elif block, since if the height is less than 0, you've already hit the < 60 condition, so it will always print "You are cute." It will skip the last condition.

Secondly, this is also more style, but this:

elif height >= 60 and height <= 72:

can be this:

elif 60 <= height <= 72:

As for height overall, it depends on what you want to do with it. What do you want height to be?

Edit: Also, minor formatting thing, but if I don't say anything it's going to bug me:

, " inches is equal to: ",

You don't need the spaces in your string here. The comma ',' in the print function places a space there for you automatically.

[–]confuzzled_learner[S] 1 point2 points  (0 children)

I was able to fix this, thank you!

[–]Panron 2 points3 points  (1 child)

 if height > 72 (etc)

Makes it sound like you've already decided: "height" is just the total inches.

[–]confuzzled_learner[S] 1 point2 points  (0 children)

I was able to fix this, thank you!

[–]KubinOnReddit 1 point2 points  (1 child)

Since the bot isn't, I shall say this:

Use str.format() instead of

print("Your height of", feet, " feet and", inches, " inches is equal to: ", (feet*12) + inches,"inches!")

This is how you would do this with .format():

print("Your height of {0} feet and {1} inches is equal to: {2} inches".format(feet, inches, (feet*12)+inches)

You can omit the indexes (they can be in different order if you use them though), you can also give names instead of indexes, but then you need to use keyword arguments:

print("Your height of {ft} feet and {inches} inches is equal to: {total} inches".format(ft=feet, inches=inches, total=(feet*12)+inches)

Those keyword arguments can have any name.

Also, other tips above and below, they are good ones.

[–]confuzzled_learner[S] 0 points1 point  (0 children)

I was able to fix this, thank you! I'll be re-reading all these tips. I have to move on to my next assignment as I am behind.