Python Forum
How to print a statement if a user's calculated number is between two floats
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print a statement if a user's calculated number is between two floats
#2
Your problem is on row # 12. You should write:

if 18.5 < userBmi < 24.9:

It is good practice to use 'growing pattern' i.e. values what are before are smaller. It it mentally easier to parse in which range number should be.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: How to print a statement if a user's calculated number is between two floats - by perfringo - Feb-10-2019, 10:59 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print user input into triangle djtjhokie 1 2,343 Nov-07-2020, 07:01 PM
Last Post: buran
  How can I print the number of unique elements in a list? AnOddGirl 5 3,196 Mar-24-2020, 05:47 AM
Last Post: AnOddGirl
  Print the longest str from user input edwdas 5 4,051 Nov-04-2019, 02:02 PM
Last Post: perfringo
  Print the Largest Odd Number Than999 5 4,130 Jul-24-2019, 11:35 AM
Last Post: jefsummers
  Round off floats in a list nagymusic 10 4,695 Apr-02-2019, 12:43 AM
Last Post: nagymusic
  How to force print statement to print on one line wlsa 4 3,503 Oct-28-2018, 09:39 PM
Last Post: wavic
  Print The Length Of The Longest Run in a User Input List Ashman111 3 3,141 Oct-26-2018, 06:56 PM
Last Post: gruntfutuk
  Help - why is my print statement being ignored? dmhdz 2 2,320 Aug-06-2018, 05:23 PM
Last Post: dmhdz
  def functions and floats alwillia 3 4,385 May-26-2018, 07:31 PM
Last Post: buran
  Help Formatting Print Statement (input from 3 lists) X 2 Hebruiser 11 6,201 Dec-06-2017, 04:47 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

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