File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed
Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env python3
2- print ('hello, world!' )
2+ print ('hello, world!' )
3+ print ('I am' , 'a good' , 'boy' )
4+ # 这里是注释部分
5+ name = input ('please enter your name:' )
6+ print ('Hello,' , name )
Original file line number Diff line number Diff line change 4646print (p )
4747# 无限大
4848r = inf
49- print (r )
49+ print (r )
50+
51+ # 第二次练习
52+ # 字符串
53+ print ('====== 第二次练习 ======' )
54+ print ('a' )
55+ print ('"a"' )
56+ print ('\' a"' )
57+ print ('\n ' )
58+ print (r'\n' )
59+ print ('''the first line
60+ the second line\n
61+ the third line''' )
62+ print (r'''the first line
63+ the second line\n
64+ the third line''' )
65+ # 布尔值 注意大小写
66+ print (0 > 1 )
67+ print (2 > 1 )
68+ print (True , False )
69+ # 布尔运算
70+ print (0 and 1 )
71+ print (1 and 1 )
72+ print (0 or 1 )
73+ print (0 or 0 )
74+ print (not 0 )
75+ print (not 1 )
76+ # 空值
77+ print (None )
78+ # 除法运算
79+ print (10 / 3 )
80+ print (9 / 3 )
81+ # 地板除
82+ print (10 // 3 )
83+ print (9 // 3 )
84+ print (10 % 3 )
85+ print (9 % 3 )
You can’t perform that action at this time.
0 commit comments