Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.66 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {},
  7. "outputs": [
  8. {
  9. "name": "stdout",
  10. "output_type": "stream",
  11. "text": [
  12. "cao zdravo\n"
  13. ]
  14. }
  15. ],
  16. "source": [
  17. "print('cao zdravo')"
  18. ]
  19. },
  20. {
  21. "cell_type": "code",
  22. "execution_count": 2,
  23. "metadata": {},
  24. "outputs": [
  25. {
  26. "name": "stdout",
  27. "output_type": "stream",
  28. "text": [
  29. "3.6.7 | packaged by conda-forge | (default, Jul 2 2019, 02:18:42) \n",
  30. "[GCC 7.3.0]\n"
  31. ]
  32. }
  33. ],
  34. "source": [
  35. "import sys\n",
  36. "print(sys.version)"
  37. ]
  38. },
  39. {
  40. "cell_type": "code",
  41. "execution_count": 3,
  42. "metadata": {},
  43. "outputs": [
  44. {
  45. "name": "stdout",
  46. "output_type": "stream",
  47. "text": [
  48. "ovo znam\n"
  49. ]
  50. }
  51. ],
  52. "source": [
  53. "print('ovo znam')\n",
  54. "#print('i ovo')"
  55. ]
  56. },
  57. {
  58. "cell_type": "code",
  59. "execution_count": 4,
  60. "metadata": {},
  61. "outputs": [
  62. {
  63. "data": {
  64. "text/plain": [
  65. "float"
  66. ]
  67. },
  68. "execution_count": 4,
  69. "metadata": {},
  70. "output_type": "execute_result"
  71. }
  72. ],
  73. "source": [
  74. "type(13.0)"
  75. ]
  76. },
  77. {
  78. "cell_type": "code",
  79. "execution_count": 5,
  80. "metadata": {},
  81. "outputs": [
  82. {
  83. "data": {
  84. "text/plain": [
  85. "bool"
  86. ]
  87. },
  88. "execution_count": 5,
  89. "metadata": {},
  90. "output_type": "execute_result"
  91. }
  92. ],
  93. "source": [
  94. "type(True)"
  95. ]
  96. },
  97. {
  98. "cell_type": "code",
  99. "execution_count": 6,
  100. "metadata": {},
  101. "outputs": [
  102. {
  103. "ename": "NameError",
  104. "evalue": "name 'integer' is not defined",
  105. "output_type": "error",
  106. "traceback": [
  107. "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
  108. "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
  109. "\u001b[0;32m<ipython-input-6-e6ee2feb40e5>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0minteger\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
  110. "\u001b[0;31mNameError\u001b[0m: name 'integer' is not defined"
  111. ]
  112. }
  113. ],
  114. "source": [
  115. "integer(True)"
  116. ]
  117. },
  118. {
  119. "cell_type": "code",
  120. "execution_count": 7,
  121. "metadata": {},
  122. "outputs": [
  123. {
  124. "data": {
  125. "text/plain": [
  126. "1"
  127. ]
  128. },
  129. "execution_count": 7,
  130. "metadata": {},
  131. "output_type": "execute_result"
  132. }
  133. ],
  134. "source": [
  135. "int(True)"
  136. ]
  137. },
  138. {
  139. "cell_type": "code",
  140. "execution_count": 8,
  141. "metadata": {},
  142. "outputs": [
  143. {
  144. "data": {
  145. "text/plain": [
  146. "1.0"
  147. ]
  148. },
  149. "execution_count": 8,
  150. "metadata": {},
  151. "output_type": "execute_result"
  152. }
  153. ],
  154. "source": [
  155. "float(True)"
  156. ]
  157. },
  158. {
  159. "cell_type": "code",
  160. "execution_count": 9,
  161. "metadata": {},
  162. "outputs": [
  163. {
  164. "ename": "NameError",
  165. "evalue": "name 'string' is not defined",
  166. "output_type": "error",
  167. "traceback": [
  168. "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
  169. "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
  170. "\u001b[0;32m<ipython-input-9-e6b2c854e09b>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mstring\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
  171. "\u001b[0;31mNameError\u001b[0m: name 'string' is not defined"
  172. ]
  173. }
  174. ],
  175. "source": [
  176. "string(True)"
  177. ]
  178. },
  179. {
  180. "cell_type": "code",
  181. "execution_count": 10,
  182. "metadata": {},
  183. "outputs": [
  184. {
  185. "data": {
  186. "text/plain": [
  187. "'True'"
  188. ]
  189. },
  190. "execution_count": 10,
  191. "metadata": {},
  192. "output_type": "execute_result"
  193. }
  194. ],
  195. "source": [
  196. "str(True)"
  197. ]
  198. },
  199. {
  200. "cell_type": "code",
  201. "execution_count": 11,
  202. "metadata": {},
  203. "outputs": [
  204. {
  205. "data": {
  206. "text/plain": [
  207. "'1.4'"
  208. ]
  209. },
  210. "execution_count": 11,
  211. "metadata": {},
  212. "output_type": "execute_result"
  213. }
  214. ],
  215. "source": [
  216. "str(1.4)"
  217. ]
  218. },
  219. {
  220. "cell_type": "code",
  221. "execution_count": 12,
  222. "metadata": {},
  223. "outputs": [
  224. {
  225. "data": {
  226. "text/plain": [
  227. "3.0"
  228. ]
  229. },
  230. "execution_count": 12,
  231. "metadata": {},
  232. "output_type": "execute_result"
  233. }
  234. ],
  235. "source": [
  236. "6/2"
  237. ]
  238. },
  239. {
  240. "cell_type": "code",
  241. "execution_count": 13,
  242. "metadata": {},
  243. "outputs": [
  244. {
  245. "data": {
  246. "text/plain": [
  247. "float"
  248. ]
  249. },
  250. "execution_count": 13,
  251. "metadata": {},
  252. "output_type": "execute_result"
  253. }
  254. ],
  255. "source": [
  256. "type(6/2)"
  257. ]
  258. },
  259. {
  260. "cell_type": "code",
  261. "execution_count": 14,
  262. "metadata": {},
  263. "outputs": [],
  264. "source": [
  265. "x=6/2"
  266. ]
  267. },
  268. {
  269. "cell_type": "code",
  270. "execution_count": 15,
  271. "metadata": {},
  272. "outputs": [
  273. {
  274. "data": {
  275. "text/plain": [
  276. "float"
  277. ]
  278. },
  279. "execution_count": 15,
  280. "metadata": {},
  281. "output_type": "execute_result"
  282. }
  283. ],
  284. "source": [
  285. "type(x)"
  286. ]
  287. },
  288. {
  289. "cell_type": "code",
  290. "execution_count": 16,
  291. "metadata": {},
  292. "outputs": [
  293. {
  294. "data": {
  295. "text/plain": [
  296. "int"
  297. ]
  298. },
  299. "execution_count": 16,
  300. "metadata": {},
  301. "output_type": "execute_result"
  302. }
  303. ],
  304. "source": [
  305. "type(6//2)"
  306. ]
  307. },
  308. {
  309. "cell_type": "code",
  310. "execution_count": 17,
  311. "metadata": {},
  312. "outputs": [
  313. {
  314. "data": {
  315. "text/plain": [
  316. "2"
  317. ]
  318. },
  319. "execution_count": 17,
  320. "metadata": {},
  321. "output_type": "execute_result"
  322. }
  323. ],
  324. "source": [
  325. "160//60"
  326. ]
  327. },
  328. {
  329. "cell_type": "code",
  330. "execution_count": 18,
  331. "metadata": {},
  332. "outputs": [],
  333. "source": [
  334. "x=3+2*2"
  335. ]
  336. },
  337. {
  338. "cell_type": "code",
  339. "execution_count": 19,
  340. "metadata": {},
  341. "outputs": [
  342. {
  343. "data": {
  344. "text/plain": [
  345. "7"
  346. ]
  347. },
  348. "execution_count": 19,
  349. "metadata": {},
  350. "output_type": "execute_result"
  351. }
  352. ],
  353. "source": [
  354. "x"
  355. ]
  356. },
  357. {
  358. "cell_type": "code",
  359. "execution_count": 21,
  360. "metadata": {},
  361. "outputs": [],
  362. "source": [
  363. "y=(3+2)*2"
  364. ]
  365. },
  366. {
  367. "cell_type": "code",
  368. "execution_count": 22,
  369. "metadata": {},
  370. "outputs": [
  371. {
  372. "data": {
  373. "text/plain": [
  374. "10"
  375. ]
  376. },
  377. "execution_count": 22,
  378. "metadata": {},
  379. "output_type": "execute_result"
  380. }
  381. ],
  382. "source": [
  383. "y"
  384. ]
  385. },
  386. {
  387. "cell_type": "code",
  388. "execution_count": 23,
  389. "metadata": {},
  390. "outputs": [],
  391. "source": [
  392. "z=x+y"
  393. ]
  394. },
  395. {
  396. "cell_type": "code",
  397. "execution_count": 24,
  398. "metadata": {},
  399. "outputs": [
  400. {
  401. "data": {
  402. "text/plain": [
  403. "17"
  404. ]
  405. },
  406. "execution_count": 24,
  407. "metadata": {},
  408. "output_type": "execute_result"
  409. }
  410. ],
  411. "source": [
  412. "z"
  413. ]
  414. },
  415. {
  416. "cell_type": "code",
  417. "execution_count": null,
  418. "metadata": {},
  419. "outputs": [],
  420. "source": []
  421. }
  422. ],
  423. "metadata": {
  424. "kernelspec": {
  425. "display_name": "Python",
  426. "language": "python",
  427. "name": "conda-env-python-py"
  428. },
  429. "language_info": {
  430. "codemirror_mode": {
  431. "name": "ipython",
  432. "version": 3
  433. },
  434. "file_extension": ".py",
  435. "mimetype": "text/x-python",
  436. "name": "python",
  437. "nbconvert_exporter": "python",
  438. "pygments_lexer": "ipython3",
  439. "version": "3.6.7"
  440. }
  441. },
  442. "nbformat": 4,
  443. "nbformat_minor": 4
  444. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement