1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "private_outputs": true,
7
+ "provenance": [],
8
+ "authorship_tag": "ABX9TyMTQC9B2SFUNDVTV4HDR4Ph"
9
+ },
10
+ "kernelspec": {
11
+ "name": "python3",
12
+ "display_name": "Python 3"
13
+ },
14
+ "language_info": {
15
+ "name": "python"
16
+ }
17
+ },
18
+ "cells": [
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": null,
22
+ "metadata": {
23
+ "id": "cRC3zQrSUK4R"
24
+ },
25
+ "outputs": [],
26
+ "source": [
27
+ "a='10'\n",
28
+ "print((a), type(a))\n",
29
+ "\n",
30
+ "b=int(a)\n",
31
+ "print((b), type(b))"
32
+ ]
33
+ },
34
+ {
35
+ "cell_type": "code",
36
+ "source": [
37
+ "a=10.5\n",
38
+ "print((a), type(a))\n",
39
+ "\n",
40
+ "b=int(10.5)\n",
41
+ "print((b), type(b))"
42
+ ],
43
+ "metadata": {
44
+ "id": "BWlh7yVfUdqk"
45
+ },
46
+ "execution_count": null,
47
+ "outputs": []
48
+ },
49
+ {
50
+ "cell_type": "code",
51
+ "source": [
52
+ "a=False\n",
53
+ "print((a), type(a))\n",
54
+ "\n",
55
+ "b=int(a)\n",
56
+ "print((b), type(b))"
57
+ ],
58
+ "metadata": {
59
+ "id": "Vy2quM3GVWgf"
60
+ },
61
+ "execution_count": null,
62
+ "outputs": []
63
+ },
64
+ {
65
+ "cell_type": "code",
66
+ "execution_count": null,
67
+ "metadata": {
68
+ "id": "DYnabzJKWN9S"
69
+ },
70
+ "outputs": [],
71
+ "source": [
72
+ "a=10\n",
73
+ "print((a), type(a))\n",
74
+ "\n",
75
+ "b=str(a)\n",
76
+ "print((b), type(b))"
77
+ ]
78
+ },
79
+ {
80
+ "cell_type": "code",
81
+ "execution_count": null,
82
+ "metadata": {
83
+ "id": "jweXxIgbWYgE"
84
+ },
85
+ "outputs": [],
86
+ "source": [
87
+ "a=10.5\n",
88
+ "print((a), type(a))\n",
89
+ "\n",
90
+ "b=str(a)\n",
91
+ "print((b), type(b))"
92
+ ]
93
+ },
94
+ {
95
+ "cell_type": "code",
96
+ "execution_count": null,
97
+ "metadata": {
98
+ "id": "3XgKNMEhWfHQ"
99
+ },
100
+ "outputs": [],
101
+ "source": [
102
+ "a=False\n",
103
+ "print((a), type(a))\n",
104
+ "\n",
105
+ "b=str(a)\n",
106
+ "print((b), type(b))"
107
+ ]
108
+ },
109
+ {
110
+ "cell_type": "code",
111
+ "execution_count": null,
112
+ "metadata": {
113
+ "id": "XDFsy_OpWeFT"
114
+ },
115
+ "outputs": [],
116
+ "source": [
117
+ "a=10\n",
118
+ "print((a), type(a))\n",
119
+ "\n",
120
+ "b=bool(a)\n",
121
+ "print((b), type(b))"
122
+ ]
123
+ },
124
+ {
125
+ "cell_type": "code",
126
+ "execution_count": null,
127
+ "metadata": {
128
+ "id": "eNnE4Jx0WspU"
129
+ },
130
+ "outputs": [],
131
+ "source": [
132
+ "a='10'\n",
133
+ "print((a), type(a))\n",
134
+ "\n",
135
+ "b=bool(a)\n",
136
+ "print((b), type(b))"
137
+ ]
138
+ },
139
+ {
140
+ "cell_type": "code",
141
+ "execution_count": null,
142
+ "metadata": {
143
+ "id": "KSir3E0yWwMl"
144
+ },
145
+ "outputs": [],
146
+ "source": [
147
+ "a=10.4\n",
148
+ "print((a), type(a))\n",
149
+ "\n",
150
+ "b=bool(a)\n",
151
+ "print((b), type(b))"
152
+ ]
153
+ },
154
+ {
155
+ "cell_type": "code",
156
+ "execution_count": null,
157
+ "metadata": {
158
+ "id": "qAeqQK_dW1k1"
159
+ },
160
+ "outputs": [],
161
+ "source": [
162
+ "a=0\n",
163
+ "print((a), type(a))\n",
164
+ "\n",
165
+ "b=bool(a)\n",
166
+ "print((b), type(b))"
167
+ ]
168
+ },
169
+ {
170
+ "cell_type": "code",
171
+ "execution_count": null,
172
+ "metadata": {
173
+ "id": "OxGNI71vW_R3"
174
+ },
175
+ "outputs": [],
176
+ "source": [
177
+ "a=10\n",
178
+ "print((a), type(a))\n",
179
+ "\n",
180
+ "b=float(a)\n",
181
+ "print((b), type(b))"
182
+ ]
183
+ },
184
+ {
185
+ "cell_type": "code",
186
+ "execution_count": null,
187
+ "metadata": {
188
+ "id": "_HCbaHltXDAJ"
189
+ },
190
+ "outputs": [],
191
+ "source": [
192
+ "a='10'\n",
193
+ "print((a), type(a))\n",
194
+ "\n",
195
+ "b=float(a)\n",
196
+ "print((b), type(b))"
197
+ ]
198
+ },
199
+ {
200
+ "cell_type": "code",
201
+ "execution_count": null,
202
+ "metadata": {
203
+ "id": "a99fAbQmXGDf"
204
+ },
205
+ "outputs": [],
206
+ "source": [
207
+ "a=True\n",
208
+ "print((a), type(a))\n",
209
+ "\n",
210
+ "b=float(a)\n",
211
+ "print((b), type(b))"
212
+ ]
213
+ }
214
+ ]
215
+ }
0 commit comments