赞
踩
- #有错误的函数1
- def wrong1():
- print("wrong1")
- print("这里有一个错误缩进")
-
- #有错误的函数2
- def wrong2():
- print("wrong2")
- if False:
- print("这个不应该输出")
- print("这个也不应该输出")
-
- #有错误的函数3
- def wrong3():
- print("wrong3") print("hello world")
-
-
- #这里是调用三个函数的代码
- #不要修改
- if __name__ == '__main__':
-
- wrong1()
- wrong2()
- wrong3()
- import keyword
-
- if __name__ == '__main__':
- #错误1
- -str1 = "string"
- print(-str1)
-
- #错误2
- 1024 = 1024
- print(1024)
-
- #错误3
- float_1.024 = 1.024
- print(float_1.024)
-
- #错误3
- False = False
- print(False)
-
-
- #在此处输出保留关键字
-
- print("end")
-
-
-
-
第3关:注释
- if __name__ == '__main__':
-
-
- #以下是要修改的代码
-
- print(1)
- print(2)
- print(3)
- print(4)
- print(5)
- print(6)
-
- """
- print("hello world")
- print("这个不应该输出")
- """
-
- print(1)
- print(2)
- print(3)
- print(4)
- if __name__ == "__main__":
- a = int(input())
- b = int(input())
- # ********** Begin ********** #
- print("%d + %d = %d" % (a,b,a+b))
- print("%d - %d = %d" % (a,b,a-b))
- print("%d * %d = %d" % (a,b,a*b))
- print("%d / %d = %f" % (a,b,a/b))
-
-
-
-
- # ********** End ********** #
-
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。