赞
踩
前言知识:
一篇文章带你了解Python print() 函数
Python的输入与输出
循环语句
代码:
a,b=map(int,input().split())
a=int(a)
b=int(b)
print(a+b)
代码:
x=int(input())
print(2*x*x+x+8)
a,b=map(int,input().split())
print(a+b,a-b,a*b,int(a/b),a%b);
代码:
a = int(input())
b = a//100%10
c = a//10%10
d = a%10
print(d,c,b,end=' ')
代码:
n = 3
line = input()
a = [int(value) for value in line.split()]
for i in range(n):
print("%-9d%-9d%-9d"%(pow(a[i],1),pow(a[i],2),pow(a[i],3)))
print()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。