如何创建"if"语句以确保输入变量是数字而不是字母?
radius = input ('What is the radius of the circle? ')
#need if statement here following the input above in case user
#presses a wrong key
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助.
从底层学习Java.我得到了Herbert Schildt的一本名为Java a Beginner's Guide(第3版)的书.这本书基于J2RE5.您是否通过使用JRE7的旧书来预测任何重大问题?谢谢.