Advertisement
plirof2

USBorne Simple-basic SOURCES

Oct 8th, 2022 (edited)
1,392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ___________
  2. https://yohan.es/swbasic
  3. _______________
  4. 10 CLS
  5. 20 PRINT "WHAT IS THE PASSWORD? "
  6. 30 INPUT P$
  7. 40 IF P$= "SAUSAGES" THEN PRINT "WELL DONE"
  8. 50 IF P$<>"SAUSAGES" THEN PRINT "WRONG, STUPID MONSTER "
  9.  
  10. _______________
  11. 10 CLS
  12. 20 PRINT "ROSES ARE RED- "
  13. 30 PRINT "VIOLETS ARE BLUE-"
  14. 40 PRINT "WITH A FACE LIKE YOURS"
  15. 50 PRINT "YOU BELONG IN A ZOO"
  16. _______________
  17. 10 CLS
  18. 20 PRINT "THERE ARE"
  19. 30 PRINT 365*24
  20. 40 PRINT "HOURS IN"
  21. 50 PRINT "A YEAR"
  22. _______________
  23. 10 CLS
  24. 20 LET N=99
  25. 30 LET B$="BANANAS"
  26. 40 PRINT N
  27. 50 PRINT B$
  28. _______________
  29. 10 CLS
  30. 20 LET N=7
  31. 30 PRINT N;" SLIMY SLUGS"
  32. 40 PRINT "ATE, ";N;" SOGGY SANDWICHES"
  33. _______________
  34. 10 CLS
  35. 20 PRINT "HOW MANY SPACES"
  36. 30 PRINT "DO YOU WANT TO LEAVE?"
  37. 40 INPUT N
  38. 50 PRINT TAB(N);"HELLO - TAB DOES NOTHING"
  39. _______________
  40. 10 CLS
  41. 20 PRINT: PRINT: PRINT
  42. 30 PRINT "DAY","MY LUNCH"
  43. 40 PRINT
  44. 50 PRINT "MONDAY", "CHOCOLATE"
  45. 60 PRINT "TUESDAY", "HAM BURGERS"
  46. 70 PRINT "WEDNESDAY","ICECREAM"
  47. 80 PRINT "THURSDAY", "SAUSAGES"
  48. 90 PRINT "FRIDAY","LOLLIPOPS"
  49. 100 PRINT "SATURDAY", "CHIPS"
  50. 110 PRINT "SUNDAY", "POPCORN"
  51. _______________
  52. 10 CLS
  53. 20 LET A=11
  54. 30 PRINT "I AM ";A;" YEARS OLD "
  55. 40 PRINT "HOW OLD ARE YOU?"
  56. 50 INPUT B
  57. 60 IF A=B THEN PRINT "WE'RE THE SAME AGE!"
  58. 70 IF A>B THEN PRINT "I'M OLDER THAN YOU"
  59. 80 IF A<B THEN PRINT "I'M YOUNGER THAN YOU "
  60. _______________
  61. 5 REM This line tells the computer to count from O to 30 in steps of a.
  62. 10 CLS
  63. 20 FOR L= 0 TO 30 STEP 5
  64. 30 PRINT L
  65. 40 NEXT L
  66. _______________
  67. 10 CLS
  68. 20 PRINT "COUNTDOWN"
  69. 30 FOR J=10 TO 7 STEP -1
  70. 40 PRINT J
  71. 50 NEXT J
  72. 60 PRINT "BLAST OFF!"
  73. _______________
  74. 10 CLS :REM WAIT
  75. 20 PRINT "HELLO EVERYBODY"
  76. 30 FOR K=1 TO 10
  77. 40 PRINT "HELLO AGAIN"
  78. 50 NEXT K
  79. _______________
  80. 10 CLS
  81. 20 FOR K=1 TO 12
  82. 30 LET A=K*9
  83. 40 PRINT K;" x 9 =";A
  84. 50 NEXT K
  85. _______________
  86. 10 CLS
  87. 20 LET W=INT(RND*5)
  88. 30 PRINT "HELLO MONSTERS"
  89. 40 PRINT "THE LUCKY WINNER"
  90. 50 PRINT "IS NUMBER ";W
  91. _______________
  92. 10 CLS
  93. 20 PRINT "#'**#**•*'* "
  94. 30 PRINT "PLEASE COME"
  95. 40 PRINT "TO MY"
  96. 50 PRINT "BIRTHDAY PARTY"
  97. 60 PRINT "DATE 19TH JULY"
  98. 70 PRINT "TIME 3.00PM"
  99. 80 PRINT "PLACE MY HOUSE "
  100. 90 PRINT "LOVE"
  101. 100 PRINT "UGLYMUG"
  102. 110 PRINT "■******■**"
  103. _______________
  104. 10 CLS
  105. 20 PRINT "HOW MANY HOURS DO YOU"
  106. 30 PRINT "SPEND WATCHING TV"
  107. 40 PRINT "EACH WEEK?"
  108. 50 INPUT X
  109. 60 LET Y=X*52
  110. 70 PRINT "THAT MEANS YOU SPEND"
  111. 80 PRINT Y;" HOURS WATCHING TV"
  112. 90 PRINT "EACH YEAR!"
  113. _______________
  114. 10 CLS
  115. 20 PRINT "HOW MANY AGES DO "
  116. 30 PRINT "YOU WANT TO AVERAGE? "
  117. 40 INPUT N
  118. 50 LET T=0
  119. 60 FOR K=1 TO N
  120. 70 PRINT "WHAT IS AGE #";K
  121. 80 INPUT X
  122. 90 LET T=T+X
  123. 100 NEXT K
  124. 110 LET A=T/N
  125. 120 PRINT "THE AVERAGE IS ";A
  126. _______________
  127. 10 CLS
  128. 20 PRINT "WHAT'S GREEN AND HAIRY "
  129. 30 PRINT "AND GOES UP AND DOWN? "
  130. 40 PRINT: PRINT: PRINT
  131. 50 FOR K=1 TO 200: NEXT K
  132. 60 PRINT "A GOOSEBERRY"
  133. 70 PRINT "IN A LIFT!!"
  134. _______________
  135. 5 REM The program above is for a number game. It uses a random number command
  136. 6 REM and a loop to produce a sequence of three numbers. You have to guess the
  137. 7 REM next number in the sequence.
  138. 10 CLS
  139. 20 LET R = INT((RND*1)*10 + 1)
  140. 30 PRINT "HERE ARE THREE NUMBERS"
  141. 40 FOR J=2 TO 4
  142. 50 PRINT J*R
  143. 60 NEXT J
  144. 70 PRINT "WHAT IS THE NEXT"
  145. 80 PRINT "IN THE SEQUENCE?"
  146. 90 LET N = 5*R
  147. 100 INPUT X
  148. 110 IF X=N THEN PRINT "YES, WELL DONE"
  149. 120 IF X<>N THEN PRINT "NO, IT'S ";N
  150. _______________
  151. 5 REM Guess game
  152. 10 CLS
  153. 20 LET R= INT(RND*25)
  154. 30 PRINT "I'M THINKING OF A"
  155. 40 PRINT "NUMBER BETWEEN"
  156. 50 PRINT "1 AND 25"
  157. 60 PRINT "GUESS WHAT IT IS."
  158. 70 INPUT G
  159. 80 IF G=R THEN GOTO 120
  160. 90 IF G<R THEN PRINT "TOO SMALL"
  161. 100 IF G>R THEN PRINT "TOO BIG"
  162. 110 GOTO 70
  163. 120 PRINT "YES, THAT'S IT"
  164. _______________
  165. 10 CLS
  166. 20 PRINT "TIMES TABLE MACHINE"
  167. 30 PRINT:PRINT
  168. 40 PRINT "WHAT TABLE DO YOU WANT?"
  169. 50 INPUT T
  170. 60 FOR J=1 TO 12
  171. 70 LET A=J*T
  172. 80 PRINT J;" x ";T;" = ";A
  173. 90 NEXT Z
  174. _______________
  175. 10 CLS
  176. 20 PRINT "DO YOU FEEL"
  177. 30 PRINT "HAPPY OR SAD?"
  178. 40 INPUT A$
  179. 50 PRINT: PRINT: PRINT
  180. 60 PRINT "ui IIHHW
  181. 70 PRINT "!□□□□□□□!"
  182. 80 IF A$="SAD" THEN PRINT "!o0aan0n!"
  183. 90 IF A$="HAPPY" THEN PRINT
  184. 100 PRINT
  185. _______________
  186. 5 REM This program makes the computer add, subtract and multiply any two numbers.
  187. 10 CLS
  188. 20 PRINT "TYPE TWO NUMBERS"
  189. 30 INPUT X: INPUT Y
  190. 40 PRINT X;" + ";Y;" = ";X+Y
  191. 50 PRINT X;" - ";Y;" = ";X-Y
  192. 60 PRINT X;" x ";Y;" = ";X*Y
  193.  
  194.  
  195. _______________
  196. 10 CLS
  197. 20 PRINT "HERE ARE FIVE RANDOM NUMBERS'"
  198. 30 FOR L=1 TO 5
  199. 40 LET R=INT(RND*10)+1
  200. 50 PRINT R
  201. 60 NEXT L
  202. _______________
  203. _______________
  204.  
  205. _______________
  206.  
  207. _______________
  208.  
  209. _______________
  210.  
  211. _______________
  212.  
  213. _______________
  214. _______________
  215.  
  216. _______________
  217.  
  218. _______________
  219.  
  220. _______________
  221.  
  222. _______________
  223.  
  224. _______________
  225. _______________
  226.  
  227. _______________
  228.  
  229. _______________
  230.  
  231. _______________
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement