Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": null,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "# Print the numbers 1 to 10\n",
  10. "for i in range(1,10):\n",
  11. " print(i)"
  12. ]
  13. },
  14. {
  15. "cell_type": "code",
  16. "execution_count": null,
  17. "metadata": {},
  18. "outputs": [],
  19. "source": [
  20. "# fix this broken loop\n",
  21. "a = range(1,11)\n",
  22. "for i in a\n",
  23. " print(\"the next number is:\")\n",
  24. " print(i)\n",
  25. "print(\"done\")"
  26. ]
  27. },
  28. {
  29. "cell_type": "code",
  30. "execution_count": null,
  31. "metadata": {},
  32. "outputs": [],
  33. "source": [
  34. "# fix this broken loop\n",
  35. "a = range(1,11)\n",
  36. "for i in a:\n",
  37. " print(\"the next number is:\")\n",
  38. " print(i)\n",
  39. "print(\"done\")"
  40. ]
  41. }
  42. ],
  43. "metadata": {
  44. "kernelspec": {
  45. "display_name": "Python 2",
  46. "language": "python",
  47. "name": "python2"
  48. },
  49. "language_info": {
  50. "codemirror_mode": {
  51. "name": "ipython",
  52. "version": 2
  53. },
  54. "file_extension": ".py",
  55. "mimetype": "text/x-python",
  56. "name": "python",
  57. "nbconvert_exporter": "python",
  58. "pygments_lexer": "ipython2",
  59. "version": "2.7.13"
  60. }
  61. },
  62. "nbformat": 4,
  63. "nbformat_minor": 2
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement