Python 判断正整数位数 (if 语句)
n = int(input('请输入一个不多于 3 位的正整数:'))
if n < 10: print('它是一位数') elif n < 100: print('它是两位数') else: print('它是三位数')
原文地址: https://www.cveoy.top/t/topic/l0AU 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
n = int(input('请输入一个不多于 3 位的正整数:'))
if n < 10: print('它是一位数') elif n < 100: print('它是两位数') else: print('它是三位数')
原文地址: https://www.cveoy.top/t/topic/l0AU 著作权归作者所有。请勿转载和采集!