Skip to content

Commit f4864fe

Browse files
committed
update
1 parent e05a303 commit f4864fe

File tree

13 files changed

+498
-0
lines changed

13 files changed

+498
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"areaTriangle(4,5)"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": null,
15+
"metadata": {
16+
"collapsed": true
17+
},
18+
"outputs": [],
19+
"source": [
20+
"import areamodule"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
26+
"metadata": {},
27+
"outputs": [],
28+
"source": [
29+
"areamodule.areaTriangle(4,5)"
30+
]
31+
},
32+
{
33+
"cell_type": "code",
34+
"execution_count": null,
35+
"metadata": {},
36+
"outputs": [],
37+
"source": [
38+
"import areamodule as am\n",
39+
"am.areaTriangle(4,5)"
40+
]
41+
},
42+
{
43+
"cell_type": "code",
44+
"execution_count": 1,
45+
"metadata": {},
46+
"outputs": [
47+
{
48+
"data": {
49+
"text/plain": [
50+
"144"
51+
]
52+
},
53+
"execution_count": 1,
54+
"metadata": {},
55+
"output_type": "execute_result"
56+
}
57+
],
58+
"source": [
59+
"from areamodule import areaSquare\n",
60+
"areaSquare(12)"
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": 2,
66+
"metadata": {},
67+
"outputs": [
68+
{
69+
"ename": "NameError",
70+
"evalue": "name 'areaTriangle' is not defined",
71+
"output_type": "error",
72+
"traceback": [
73+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
74+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
75+
"\u001b[1;32m<ipython-input-2-5e0caacc1977>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mareaTriangle\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m4\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m5\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
76+
"\u001b[1;31mNameError\u001b[0m: name 'areaTriangle' is not defined"
77+
]
78+
}
79+
],
80+
"source": [
81+
"areaTriangle(4,5)"
82+
]
83+
},
84+
{
85+
"cell_type": "code",
86+
"execution_count": null,
87+
"metadata": {
88+
"collapsed": true
89+
},
90+
"outputs": [],
91+
"source": []
92+
}
93+
],
94+
"metadata": {
95+
"kernelspec": {
96+
"display_name": "Python 3",
97+
"language": "python",
98+
"name": "python3"
99+
},
100+
"language_info": {
101+
"codemirror_mode": {
102+
"name": "ipython",
103+
"version": 3
104+
},
105+
"file_extension": ".py",
106+
"mimetype": "text/x-python",
107+
"name": "python",
108+
"nbconvert_exporter": "python",
109+
"pygments_lexer": "ipython3",
110+
"version": "3.6.3"
111+
}
112+
},
113+
"nbformat": 4,
114+
"nbformat_minor": 2
115+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cells": [],
3+
"metadata": {},
4+
"nbformat": 4,
5+
"nbformat_minor": 2
6+
}
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def areaSquare(side):
2+
return side * side
3+
4+
def areaTriangle(base, height):
5+
return .5 * base * height

ClassExamples/DCRUSTpython2w/ModulesPackages/mypack/__init__.py

Whitespace-only changes.
Binary file not shown.
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def areaSquare(side):
2+
return side * side
3+
4+
def areaTriangle(base, height):
5+
return .5 * base * height
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
def perimeterRectangle(length, bredth):
2+
return 2*(length + bredth)
3+
4+
def perimeterSquare(side):
5+
return 4*side

0 commit comments

Comments
 (0)