PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, July 19, 2022

[FIXED] How can I make a condition where a variable needs to have a range of numbers (lets say from 1 to 10) to be True?

 July 19, 2022     android, integer, python, python-3.x, variables     No comments   

Issue

Hipertensión1 = S == range(140,159) and D == range(90,99) So I'm trying to make a project related to the medical field.

I want the systolic value to be between 140 and 159 and the Diastolic value between 90 and 99 for Hipertension type 1 to be True.


Solution

if (140 <= systolic_value <= 159) and (90 <= diastolic_value <= 99):
    hypertension_1 = True


Answered By - Damiaan
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing