We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a96037b commit 265a0dbCopy full SHA for 265a0db
chapter11/a.test
chapter11/practice/11_1/11_1.py
@@ -0,0 +1,40 @@
1
+#!/usr/bin/python
2
+# -*- coding: utf-8 -*-
3
+__author__ = 'xy'
4
+
5
6
+def countToFour1():
7
+ for eachNum in range(5):
8
+ print(eachNum)
9
10
11
+def countToFour2(n):
12
+ for eachNum in range(n, 5):
13
14
15
16
+def countToFour3(n=1):
17
18
19
20
21
+a = 2
22
+b = 4
23
+c = 5
24
25
+d = max(1,2,3)
26
+# countToFour1(a) error
27
+countToFour2(a)
28
+countToFour3(a)
29
30
+# countToFour1(b) error
31
+countToFour2(b)
32
+countToFour3(b)
33
34
+# countToFour1(c) error
35
+countToFour2(c)
36
+countToFour3(c)
37
38
+countToFour1()
39
+# countToFour2() error
40
+countToFour3()
0 commit comments