EasyManuals Logo

Sinclair QL Beginner's Guide

Sinclair QL
135 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #16 background imageLoading...
Page #16 background image
18. Why are freely chosen identifiers important in programming?
PROBLEMS ON CHAPTER 2
1. Carry out a dry run to show the values of all variables as each line of the following program is
executed:
10 LET hours = 40
20 LET rate = 31
30 LET wage = hours * rate
40 PRINT hours, rate, wage
2. Write and test a program, similar to that of problem 1, which compute s the area of a carpet is 3
metres in width and 4 metres in length. Use the variable names: width, length, area.
3. Re-write the program of problem 1 so that it uses two INPUT statements instead of LET
statements.
4. Re write the program of problem 1 so that the input data (40 and 3) appears in a DATA statement
instead of a LET statement.
5. Re write the program of problem 2 using a different method of data input. Use READ and DATA if
you originally used LET and vice-versa.
6. Bill and Ben agree to have a gamble. Each will take out of his wallet all the pound notes and give
them to the other. Write a program to simulate this entirely with LET and PRINT statements. Use
a third person, Sue, to hold Bill's money while he accepts Ben's.
7. Re-write the program of problem 6 so that a DATA statement holds the two numbers to be
exchanged.

Other manuals for Sinclair QL

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair QL and is the answer not in the manual?

Sinclair QL Specifications

General IconGeneral
ProcessorMotorola 68008
Clock Speed7.5 MHz
RAM128 KB (expandable to 640 KB)
ROM48 KB
Operating SystemSinclair QDOS
Release Year1984
StorageMicrodrive tape loop
Graphics256x256 pixels, 8 colors
PortsRS-232, ROM cartridge
SoundBeeper (internal speaker)

Related product manuals