File tree 6 files changed +159
-19
lines changed
6 files changed +159
-19
lines changed Original file line number Diff line number Diff line change 2
2
"cells" : [
3
3
{
4
4
"cell_type" : " code" ,
5
- "execution_count" : 3 ,
5
+ "execution_count" : 1 ,
6
6
"metadata" : {},
7
7
"outputs" : [],
8
8
"source" : [
11
11
},
12
12
{
13
13
"cell_type" : " code" ,
14
- "execution_count" : 4 ,
14
+ "execution_count" : 2 ,
15
15
"metadata" : {},
16
16
"outputs" : [
17
17
{
20
20
" int"
21
21
]
22
22
},
23
- "execution_count" : 4 ,
23
+ "execution_count" : 2 ,
24
24
"metadata" : {},
25
25
"output_type" : " execute_result"
26
26
}
31
31
},
32
32
{
33
33
"cell_type" : " code" ,
34
- "execution_count" : 5 ,
34
+ "execution_count" : 3 ,
35
35
"metadata" : {},
36
36
"outputs" : [
37
37
{
48
48
},
49
49
{
50
50
"cell_type" : " code" ,
51
- "execution_count" : 6 ,
51
+ "execution_count" : 4 ,
52
52
"metadata" : {},
53
53
"outputs" : [],
54
54
"source" : [
57
57
},
58
58
{
59
59
"cell_type" : " code" ,
60
- "execution_count" : 7 ,
60
+ "execution_count" : 5 ,
61
61
"metadata" : {},
62
62
"outputs" : [],
63
63
"source" : [
66
66
},
67
67
{
68
68
"cell_type" : " code" ,
69
- "execution_count" : 8 ,
69
+ "execution_count" : 6 ,
70
70
"metadata" : {},
71
71
"outputs" : [
72
72
{
75
75
" 30"
76
76
]
77
77
},
78
- "execution_count" : 8 ,
78
+ "execution_count" : 6 ,
79
79
"metadata" : {},
80
80
"output_type" : " execute_result"
81
81
}
86
86
},
87
87
{
88
88
"cell_type" : " code" ,
89
- "execution_count" : 9 ,
89
+ "execution_count" : 7 ,
90
90
"metadata" : {},
91
91
"outputs" : [
92
92
{
103
103
},
104
104
{
105
105
"cell_type" : " code" ,
106
- "execution_count" : 10 ,
106
+ "execution_count" : 8 ,
107
107
"metadata" : {},
108
108
"outputs" : [
109
109
{
120
120
},
121
121
{
122
122
"cell_type" : " code" ,
123
- "execution_count" : 11 ,
123
+ "execution_count" : 9 ,
124
124
"metadata" : {},
125
125
"outputs" : [],
126
126
"source" : [
129
129
},
130
130
{
131
131
"cell_type" : " code" ,
132
- "execution_count" : 12 ,
132
+ "execution_count" : 10 ,
133
133
"metadata" : {},
134
134
"outputs" : [
135
135
{
138
138
" True"
139
139
]
140
140
},
141
- "execution_count" : 12 ,
141
+ "execution_count" : 10 ,
142
142
"metadata" : {},
143
143
"output_type" : " execute_result"
144
144
}
149
149
},
150
150
{
151
151
"cell_type" : " code" ,
152
- "execution_count" : 15 ,
152
+ "execution_count" : 11 ,
153
153
"metadata" : {},
154
154
"outputs" : [
155
155
{
158
158
" False"
159
159
]
160
160
},
161
- "execution_count" : 15 ,
161
+ "execution_count" : 11 ,
162
162
"metadata" : {},
163
163
"output_type" : " execute_result"
164
164
}
169
169
},
170
170
{
171
171
"cell_type" : " code" ,
172
- "execution_count" : 16 ,
172
+ "execution_count" : 12 ,
173
173
"metadata" : {},
174
174
"outputs" : [
175
175
{
186
186
},
187
187
{
188
188
"cell_type" : " code" ,
189
- "execution_count" : 18 ,
189
+ "execution_count" : 13 ,
190
190
"metadata" : {},
191
191
"outputs" : [
192
192
{
203
203
},
204
204
{
205
205
"cell_type" : " code" ,
206
- "execution_count" : 21 ,
206
+ "execution_count" : 14 ,
207
207
"metadata" : {},
208
208
"outputs" : [
209
209
{
220
220
},
221
221
{
222
222
"cell_type" : " code" ,
223
- "execution_count" : 22 ,
223
+ "execution_count" : 15 ,
224
224
"metadata" : {},
225
225
"outputs" : [
226
226
{
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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 ()
You can’t perform that action at this time.
0 commit comments