中文版:打印输出复习
some examples for using function “print()“
#print the string or the calculation result
print("hello world")
print("1+3")
print(1+3)
print("1+3=",1+3)# don't forget the comma#print the value of variable or print the string
a=10
print(a)
print("a")#print 2 variables
a=9
b="hi"
print(a,b)#print with/without enter
print(1,2,3,4)
print(1)
print(2)
print(3)
print(4)
print(1,end="")
print(2,end="")
print(3,end="")
print(4,end="")practice
-
print your name
-
print the result of 3+46
-
print the expression 3+46=49
-
print the name of 2 variables a=4 and b=“we”
-
print the value of 2 variables a=4 and b=“we”
-
print the value of a=4, and then print the value of b=5 without line break
fix the errors:
print 2a=b=3
print a+ba=b=3
print(a+b)print(a"hi")print(ab)print(a,"end=""")