-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple13.html
More file actions
75 lines (70 loc) · 1.46 KB
/
Copy pathsimple13.html
File metadata and controls
75 lines (70 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
layout: base.html
title: Simple HTML - Programs and puzzles
---
<section class="side-by-side">
<canvas class="game right" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
<div>
<article>
<h1>Programs and puzzles</h1>
<p>
Here and on the next few pages, there are
programs to try and puzzles to solve.
They all involve BASIC commands
covered in this book.
</p>
<h2>Words and spaces</h2>
<p>
Try this program. It makes
the computer display words
next to each other on the screen.
</p>
<pre>
10 CLS
20 PRINT "RED";"ROSE"
30 PRINT "BLACK";"COAL"
40 PRINT "WHITE" ;"SNOW"
</pre>
<p>
See if you can change the
<code class="command">PRINT</code> lines to make spaces
between the words, as shown in #2 below.
</p>
<p>
<center><img src="{{ base_uri }}/img/usborne/simple-basic/img/13puzzle1.png"></center>
</p>
<p>
Can you change the <code class="command">PRINT</code>
lines again so the computer
arranges the words in two
columns like in #3?
</p>
<h2>Star lines</h2>
<p>
Run this program to make
your computer display a
line of stars at the side
of the screen.
</p>
<pre>
10 CLS
20 FOR K=1 TO 10
30 PRINT TAB(3);"*"
40 NEXT K
</pre>
<p>
By changing the number
after <code>TAB</code>, can you put the
stars in the middle of the screen?
</p>
<p>
Can you change the program
again to make a line of stars
across the screen, like this?
</p>
<p>
<center><img src="{{ base_uri }}/img/usborne/simple-basic/img/13puzzle2.png"></center>
</p>
</article>
</div>
</section>