Fortune Telling Collection - Fortune-telling birth date - Python height and weight program code

Python height and weight program code

WhileTrue:weight=input ("Please enter your weight: (unit: kg)" Kg)")tall=input ("Please enter your height: (unit: m)") weight = float (weight) tall = float (height) Body mass index = weight/height * * 2 # Calculation formula. = and BMI

Python provides efficient high-level data structures and can also be used for simple and effective object-oriented programming. Python's syntax and dynamic types, as well as the nature of explanatory language, make it a programming language for writing scripts and developing applications quickly on most platforms. With the continuous updating of the version and the addition of new language functions, it is gradually used for the development of independent large-scale projects. Python supports a variety of programming paradigms, including functional, imperative, structured, object-oriented and reflective programming. Python interpreters are easy to extend. You can use C or C++ (or other languages that can be called through C) to extend new functions and data types. Python can also be used as an extension language in customizable software. Python has a dynamic type system and garbage collection function, which can automatically manage memory usage, and has a huge and extensive standard library, providing source code or machine code suitable for major system platforms. Python adheres to a clear and unified design style, which makes Python a widely used language that is easy to read and maintain, and is welcomed by a large number of users.

The general guiding ideology of designers is that there is only one best way to solve a specific problem. This is expressed in the Python motto written by TimPeters (called ZenofPython): There should be one-preferably only one-obvious method. This is completely contrary to the central idea of Perl (another high-level dynamic language with similar functions) TMTOWTDI(smorethanonewaytoidit). Python's author deliberately designed a very strict grammar, which made bad programming habits (such as the next line of if statement not indented to the right) unable to compile. One of the most important items is Python's indentation rules.