Guest User

Untitled

a guest
Dec 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {
  7. "collapsed": true
  8. },
  9. "outputs": [],
  10. "source": [
  11. "from mobilechelonian import Turtle"
  12. ]
  13. },
  14. {
  15. "cell_type": "code",
  16. "execution_count": 2,
  17. "metadata": {},
  18. "outputs": [
  19. {
  20. "data": {
  21. "application/vnd.jupyter.widget-view+json": {
  22. "model_id": "a1786f82af5b4ee8b529d0b68b2609ea"
  23. }
  24. },
  25. "metadata": {},
  26. "output_type": "display_data"
  27. }
  28. ],
  29. "source": [
  30. "bob = Turtle()"
  31. ]
  32. },
  33. {
  34. "cell_type": "code",
  35. "execution_count": 3,
  36. "metadata": {},
  37. "outputs": [],
  38. "source": [
  39. "bob.speed(10)"
  40. ]
  41. },
  42. {
  43. "cell_type": "code",
  44. "execution_count": 4,
  45. "metadata": {},
  46. "outputs": [
  47. {
  48. "ename": "AttributeError",
  49. "evalue": "'Turtle' object has no attribute 'fly'",
  50. "output_type": "error",
  51. "traceback": [
  52. "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
  53. "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
  54. "\u001b[1;32m<ipython-input-4-08404464538a>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mbob\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mfly\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
  55. "\u001b[1;31mAttributeError\u001b[0m: 'Turtle' object has no attribute 'fly'"
  56. ]
  57. }
  58. ],
  59. "source": [
  60. "bob.fly()"
  61. ]
  62. },
  63. {
  64. "cell_type": "code",
  65. "execution_count": 5,
  66. "metadata": {
  67. "collapsed": true
  68. },
  69. "outputs": [],
  70. "source": [
  71. "bob.forward(50)\n",
  72. "bob.right(90)"
  73. ]
  74. },
  75. {
  76. "cell_type": "code",
  77. "execution_count": 6,
  78. "metadata": {
  79. "collapsed": true
  80. },
  81. "outputs": [],
  82. "source": [
  83. "bob.forward(50)\n",
  84. "bob.right(90)"
  85. ]
  86. },
  87. {
  88. "cell_type": "code",
  89. "execution_count": 7,
  90. "metadata": {
  91. "collapsed": true
  92. },
  93. "outputs": [],
  94. "source": [
  95. "bob.forward(50)\n",
  96. "bob.right(90)"
  97. ]
  98. },
  99. {
  100. "cell_type": "code",
  101. "execution_count": 8,
  102. "metadata": {
  103. "collapsed": true
  104. },
  105. "outputs": [],
  106. "source": [
  107. "bob.forward(50)\n",
  108. "bob.right(90)"
  109. ]
  110. },
  111. {
  112. "cell_type": "code",
  113. "execution_count": null,
  114. "metadata": {
  115. "collapsed": true
  116. },
  117. "outputs": [],
  118. "source": []
  119. }
  120. ],
  121. "metadata": {
  122. "kernelspec": {
  123. "display_name": "Python 3",
  124. "language": "python",
  125. "name": "python3"
  126. },
  127. "language_info": {
  128. "codemirror_mode": {
  129. "name": "ipython",
  130. "version": 3
  131. },
  132. "file_extension": ".py",
  133. "mimetype": "text/x-python",
  134. "name": "python",
  135. "nbconvert_exporter": "python",
  136. "pygments_lexer": "ipython3",
  137. "version": "3.5.2"
  138. }
  139. },
  140. "nbformat": 4,
  141. "nbformat_minor": 2
  142. }
Add Comment
Please, Sign In to add comment