Skip to content

Commit 8ab7eb7

Browse files
committed
game1
1 parent 34f5da1 commit 8ab7eb7

File tree

6 files changed

+159
-19
lines changed

6 files changed

+159
-19
lines changed

Diff for: Basics/basics1.ipynb

+19-19
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 3,
5+
"execution_count": 1,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 4,
14+
"execution_count": 2,
1515
"metadata": {},
1616
"outputs": [
1717
{
@@ -20,7 +20,7 @@
2020
"int"
2121
]
2222
},
23-
"execution_count": 4,
23+
"execution_count": 2,
2424
"metadata": {},
2525
"output_type": "execute_result"
2626
}
@@ -31,7 +31,7 @@
3131
},
3232
{
3333
"cell_type": "code",
34-
"execution_count": 5,
34+
"execution_count": 3,
3535
"metadata": {},
3636
"outputs": [
3737
{
@@ -48,7 +48,7 @@
4848
},
4949
{
5050
"cell_type": "code",
51-
"execution_count": 6,
51+
"execution_count": 4,
5252
"metadata": {},
5353
"outputs": [],
5454
"source": [
@@ -57,7 +57,7 @@
5757
},
5858
{
5959
"cell_type": "code",
60-
"execution_count": 7,
60+
"execution_count": 5,
6161
"metadata": {},
6262
"outputs": [],
6363
"source": [
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 8,
69+
"execution_count": 6,
7070
"metadata": {},
7171
"outputs": [
7272
{
@@ -75,7 +75,7 @@
7575
"30"
7676
]
7777
},
78-
"execution_count": 8,
78+
"execution_count": 6,
7979
"metadata": {},
8080
"output_type": "execute_result"
8181
}
@@ -86,7 +86,7 @@
8686
},
8787
{
8888
"cell_type": "code",
89-
"execution_count": 9,
89+
"execution_count": 7,
9090
"metadata": {},
9191
"outputs": [
9292
{
@@ -103,7 +103,7 @@
103103
},
104104
{
105105
"cell_type": "code",
106-
"execution_count": 10,
106+
"execution_count": 8,
107107
"metadata": {},
108108
"outputs": [
109109
{
@@ -120,7 +120,7 @@
120120
},
121121
{
122122
"cell_type": "code",
123-
"execution_count": 11,
123+
"execution_count": 9,
124124
"metadata": {},
125125
"outputs": [],
126126
"source": [
@@ -129,7 +129,7 @@
129129
},
130130
{
131131
"cell_type": "code",
132-
"execution_count": 12,
132+
"execution_count": 10,
133133
"metadata": {},
134134
"outputs": [
135135
{
@@ -138,7 +138,7 @@
138138
"True"
139139
]
140140
},
141-
"execution_count": 12,
141+
"execution_count": 10,
142142
"metadata": {},
143143
"output_type": "execute_result"
144144
}
@@ -149,7 +149,7 @@
149149
},
150150
{
151151
"cell_type": "code",
152-
"execution_count": 15,
152+
"execution_count": 11,
153153
"metadata": {},
154154
"outputs": [
155155
{
@@ -158,7 +158,7 @@
158158
"False"
159159
]
160160
},
161-
"execution_count": 15,
161+
"execution_count": 11,
162162
"metadata": {},
163163
"output_type": "execute_result"
164164
}
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 16,
172+
"execution_count": 12,
173173
"metadata": {},
174174
"outputs": [
175175
{
@@ -186,7 +186,7 @@
186186
},
187187
{
188188
"cell_type": "code",
189-
"execution_count": 18,
189+
"execution_count": 13,
190190
"metadata": {},
191191
"outputs": [
192192
{
@@ -203,7 +203,7 @@
203203
},
204204
{
205205
"cell_type": "code",
206-
"execution_count": 21,
206+
"execution_count": 14,
207207
"metadata": {},
208208
"outputs": [
209209
{
@@ -220,7 +220,7 @@
220220
},
221221
{
222222
"cell_type": "code",
223-
"execution_count": 22,
223+
"execution_count": 15,
224224
"metadata": {},
225225
"outputs": [
226226
{

Diff for: Basics/functions/concepts.ipynb

Whitespace-only changes.

Diff for: Basics/userInput.ipynb

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"name=input('Enter Your Name')"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 2,
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stdout",
19+
"output_type": "stream",
20+
"text": [
21+
"harendra\n"
22+
]
23+
}
24+
],
25+
"source": [
26+
"print(name)"
27+
]
28+
},
29+
{
30+
"cell_type": "code",
31+
"execution_count": 3,
32+
"metadata": {},
33+
"outputs": [
34+
{
35+
"data": {
36+
"text/plain": [
37+
"str"
38+
]
39+
},
40+
"execution_count": 3,
41+
"metadata": {},
42+
"output_type": "execute_result"
43+
}
44+
],
45+
"source": [
46+
"type(name)"
47+
]
48+
},
49+
{
50+
"cell_type": "code",
51+
"execution_count": 4,
52+
"metadata": {},
53+
"outputs": [
54+
{
55+
"name": "stdout",
56+
"output_type": "stream",
57+
"text": [
58+
"0.9554140127388535\n"
59+
]
60+
}
61+
],
62+
"source": [
63+
"circumference=float(input(\"Enter circumference of circle\"))\n",
64+
"r=circumference/(2*3.14)\n",
65+
"print(r)\n"
66+
]
67+
},
68+
{
69+
"cell_type": "code",
70+
"execution_count": 7,
71+
"metadata": {},
72+
"outputs": [
73+
{
74+
"name": "stdout",
75+
"output_type": "stream",
76+
"text": [
77+
"Area is 2.8662420382165603\n"
78+
]
79+
}
80+
],
81+
"source": [
82+
"area=3.14*r*r\n",
83+
"print('Area is',area)"
84+
]
85+
},
86+
{
87+
"cell_type": "code",
88+
"execution_count": null,
89+
"metadata": {},
90+
"outputs": [],
91+
"source": []
92+
}
93+
],
94+
"metadata": {
95+
"kernelspec": {
96+
"display_name": "Python 3.10.7 64-bit",
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.10.7"
111+
},
112+
"orig_nbformat": 4,
113+
"vscode": {
114+
"interpreter": {
115+
"hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49"
116+
}
117+
}
118+
},
119+
"nbformat": 4,
120+
"nbformat_minor": 2
121+
}

Diff for: functions/fame_Ex.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import pgzrun
2+
HEIGHT=600
3+
WIDTH=800
4+
p=Actor('ironman.png',(100,100))
5+
c=Actor('cookie.png',(30,80))
6+
7+
def draw():
8+
screen.fill('white')
9+
p.draw()
10+
c.draw()
11+
print('drawing')
12+
13+
def update():
14+
p.x -= 3
15+
p.angle = -10
16+
if p.x < 0: # player moving from left side
17+
p.x=WIDTH
18+
print(p.x, p.y)
19+
pgzrun.go()

Diff for: functions/images/cookie.png

3.59 KB
Loading

Diff for: functions/images/ironman.png

5.46 KB
Loading

0 commit comments

Comments
 (0)