1. x=77 print('%c %x'%(x+32,x+32))
2.
x=5935.1476
print('%5.3f\t%e\n%12.5f'%(x,x,x))
3.
x=2.5 y=4.7 a=7 print(x+a%3*int(x+y)%2//4)
4.
a=3 b=4 c=5 print(a or b+c and b-c) print(a+b>c and b==c) print(not (a>b)and not c or 1 ) print(not (a+b)+c-1 and b+c/2)
5.
a = int(input('请输入第一个2位数: ')) b = int(input('请输入第二个2位数: ')) print('新四位数:', b // 10 * 1000 + a % 10 * 100 + b % 10 * 10 + a // 10)
6.
import turtle
turtle.pensize(10)
turtle.color('red')
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(120)
turtle.right(90)
turtle.forward(120)
turtle.done()