摘要:
1、情形1(输入数字):salary = input("salary:")if salary.isdigit():#判断一个数是不是数字 salary = int(salary) print(type(salary))else: exit("must input digit")#退出程序打印结果: 阅读全文
摘要:
name = input("name:")age = input("age:")job = input("job:")salary = input("salary:")msg = ''' information of %s name:%sage:%sjob:%ssalary:%s end '''%( 阅读全文
摘要:
1、代码: i = 1ji = 1while (i <= 9): j = 1 while(j <= i): ji = j * i print(str(j)+"*"+str(i)+"="+str(ji),end=" ")#使用end不换行,每个等式后留三个空格 j = j + 1 print()#换行 阅读全文