Guest User

Untitled

a guest
Dec 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. #nadyah scott-black
  2. #CIS101
  3. #Random Coding
  4. #december 10
  5. #This project is meant to develop skills in coding using strings
  6.  
  7.  
  8.  
  9.  
  10. #import random code allows you to upload random numbers
  11. import random
  12. #This allos a random number to be uploaded 1-8
  13. i = random.randint(0,8)
  14.  
  15. #I thought of it on my own, I chose this pattern because these symbols were interesting .
  16. def apples ():
  17. A="$"
  18. B="!"
  19. for i in range (12):
  20. print((A+B)*25)
  21. print((B+A)*25)
  22. #I thought of this on my own, I chose this pattern beacuse I wondered how abstract the the string would be with my favorite symbols
  23.  
  24.  
  25. def bananas ():
  26. A="#"
  27. B="*"
  28. C="@"
  29. for i in range (12):
  30. print ((A+B+C)*25)
  31. print ((C+B+A)*25)
  32.  
  33.  
  34. #I Thought of this on my own, I chose this pattern beacuse I questioned whether or not the pattern would look nicely printed or abstract like the last pattern.
  35. def grapes():
  36. A="%"
  37. B="!"
  38. C="^"
  39. D="-"
  40. for i in range (12):
  41. print ((A+B+C+D)*25)
  42. print ((D+C+B+A)*25)
  43. #I thought of this on my own. I chose this pattern because I wanted to see how the percent symbols would fit in with the exclamation sign,minus sign, the apostrophe
  44.  
  45. def oranges ():
  46. A="+"
  47. B="-"
  48. C=">"
  49. D="#"
  50. E="<"
  51. for i in range (12):
  52. print ((A+B+C+D+E)*25)
  53. print ((E+D+C+B+A)*25)
  54.  
  55. #I thought of this on my own, I chose this pattern beacuse I wanted to make a bunch of weird shapes but it did not work out that way and I thought the way the pattern printed was unique so I kept it.
  56.  
  57. def pears ():
  58. A="="
  59. B="*"
  60. for i in range (12):
  61. print ((A+B)*25)
  62. print ((B+A)*25)
  63.  
  64. fruits = [apples, bananas, grapes, oranges, pears]
  65.  
  66.  
  67. fruits [i] ()
Add Comment
Please, Sign In to add comment