PyWebIO v1.8.2 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() Also, the PyWebIO Playground [https://play.pywebio.online/] is a good place to write, run and share your PyWebIO code online. Input The input functions are defined in the pywebio.input module and can be0 码力 | 160 页 | 7.47 MB | 1 年前3
PyWebIO v1.8.1 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() Also, the PyWebIO Playground [https://play.pywebio.online/] is a good place to write, run and share your PyWebIO code online. Input The input functions are defined in the pywebio.input module and can be0 码力 | 160 页 | 7.47 MB | 1 年前3
PyWebIO v1.7.1 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() 'darcula', }, value='import something\n# Write your python code') data = input_group("Basic info",[ input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age)0 码力 | 152 页 | 7.47 MB | 1 年前3
PyWebIO v1.8.2 DocumentationFLOAT from pywebio.output import put_text def bmi(): height = input("Input your height(cm)", type=FLOAT) weight = input("Input your weight(kg)", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status obese'), (float('inf'), 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a online and see what happens. Also, the PyWebIO Playground is a good place to write, run and share your PyWebIO code online. 4.1.1 Input The input functions are defined in the pywebio.input module and0 码力 | 118 页 | 1.40 MB | 1 年前3
PyWebIO v1.8.0 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() Also, the PyWebIO Playground [https://play.pywebio.online/] is a good place to write, run and share your PyWebIO code online. Input The input functions are defined in the pywebio.input module and can be0 码力 | 159 页 | 7.47 MB | 1 年前3
PyWebIO v1.7.0 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() 'darcula', }, value='import something\n# Write your python code') data = input_group("Basic info",[ input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age)0 码力 | 149 页 | 7.46 MB | 1 年前3
PyWebIO v1.8.1 DocumentationFLOAT from pywebio.output import put_text def bmi(): height = input("Input your height(cm)", type=FLOAT) weight = input("Input your weight(kg)", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status obese'), (float('inf'), 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a online and see what happens. Also, the PyWebIO Playground is a good place to write, run and share your PyWebIO code online. 4.1.1 Input The input functions are defined in the pywebio.input module and0 码力 | 118 页 | 1.40 MB | 1 年前3
PyWebIO v1.7.1 DocumentationFLOAT from pywebio.output import put_text def bmi(): height = input("Input your height(cm)", type=FLOAT) weight = input("Input your weight(kg)", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status obese'), (float('inf'), 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a textarea('Code Edit', code={ 'mode': "python", 'theme': 'darcula', }, value='import something\n# Write your python code') The results of the above example are as follows: Input Group PyWebIO uses input group0 码力 | 112 页 | 1.38 MB | 1 年前3
PyWebIO v1.8.0 DocumentationFLOAT from pywebio.output import put_text def bmi(): height = input("Input your height(cm)", type=FLOAT) weight = input("Input your weight(kg)", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status obese'), (float('inf'), 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() This is just a online and see what happens. Also, the PyWebIO Playground is a good place to write, run and share your PyWebIO code online. 4.1.1 Input The input functions are defined in the pywebio.input module and0 码力 | 118 页 | 1.40 MB | 1 年前3
PyWebIO v1.6.3 Documentationfrom pywebio.output import put_text def bmi(): height = input("Input your height(cm):", type=FLOAT) weight = input("Input your weight(kg):", type=FLOAT) BMI = weight / (height / 100) ** 2 top_status 'Severely obese')] for top, status in top_status: if BMI <= top: put_text('Your BMI: %.1f. Category: %s' % (BMI, status)) break if __name__ == '__main__': bmi() 'darcula', }, value='import something\n# Write your python code') data = input_group("Basic info",[ input('Input your name', name='name'), input('Input your age', name='age', type=NUMBER, validate=check_age)0 码力 | 150 页 | 7.46 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













