小编Inh*_*.Py的帖子

How to use user input to end a program?

I'm new to python and I am writing a program that converts Millimeters to Inches. Basically its a continuous loop that allows you to keep putting in numbers and get the correct converted measurement. I want to put an IF statement that will allow the user to type "end" to end the program instead of converting more units of measurement. How would I go about making this work (what python code allows you to exit a written program and can …

python if-statement python-3.x

5
推荐指数
2
解决办法
3万
查看次数

标签 统计

if-statement ×1

python ×1

python-3.x ×1