Inapakia....
|
Bonyeza na Ushikilie kuvuta kuzunguka |
|||
|
Bonyeza Hapa Kufunga |
|||
Swali 1 Ripoti
Write a QBASIC program to grade any score entered from the keyboard as either "Poor" for a score that is below 50% or "Satisfactory" for a score that is equal to or above 50%. The program execution should stop as soon as a score that is less than zero is entered.
QBASIC program to grade a score as "Poor" or "Satisfactory"
The program keeps asking for a score. If the score entered is less than zero, it stops immediately. Otherwise it prints "Poor" for a score below 50 and "Satisfactory" for a score of 50 or above.
REM Program to grade scores
CLS
DO
INPUT "Enter a score (negative to stop): ", SCORE
IF SCORE < 0 THEN
EXIT DO
END IF
IF SCORE < 50 THEN
PRINT "Poor"
ELSE
PRINT "Satisfactory"
END IF
LOOP
ENDHow it works:
SCORE < 0, the EXIT DO statement ends the loop and the program stops.Alternative using GOTO (also acceptable):
CLS
Start:
INPUT "Enter a score: ", SCORE
IF SCORE < 0 THEN END
IF SCORE < 50 THEN PRINT "Poor" ELSE PRINT "Satisfactory"
GOTO Start
Maelezo ya Majibu
QBASIC program to grade a score as "Poor" or "Satisfactory"
The program keeps asking for a score. If the score entered is less than zero, it stops immediately. Otherwise it prints "Poor" for a score below 50 and "Satisfactory" for a score of 50 or above.
REM Program to grade scores
CLS
DO
INPUT "Enter a score (negative to stop): ", SCORE
IF SCORE < 0 THEN
EXIT DO
END IF
IF SCORE < 50 THEN
PRINT "Poor"
ELSE
PRINT "Satisfactory"
END IF
LOOP
ENDHow it works:
SCORE < 0, the EXIT DO statement ends the loop and the program stops.Alternative using GOTO (also acceptable):
CLS
Start:
INPUT "Enter a score: ", SCORE
IF SCORE < 0 THEN END
IF SCORE < 50 THEN PRINT "Poor" ELSE PRINT "Satisfactory"
GOTO Start
Swali 2 Ripoti
(a)(i) Define computer graphics.
(ii) List two applications of computer graphics in advertising.
(b) Give one use of the following computer graphics application tools;
(i) Interactive Fill Tool (ii) Texture Fill Tool (iii) Envelops Tool (iv) Extrude Tool
(c) Name one Fill Tool in computer graphic application which is needed to (i) create a background that is faded from light blue to white (ii) fill an object with two colours that blend from one to another.
(a)(i) Define computer graphics.
Computer graphics is the branch of computing concerned with creating, storing, editing and displaying pictures, images, drawings and other visual content using a computer. It covers both the pictures produced (such as diagrams, charts and animations) and the techniques and software used to generate and manipulate them.
(a)(ii) Two applications of computer graphics in advertising:
(b) One use of each graphics tool:
(c) Name one Fill Tool needed to:
Maelezo ya Majibu
(a)(i) Define computer graphics.
Computer graphics is the branch of computing concerned with creating, storing, editing and displaying pictures, images, drawings and other visual content using a computer. It covers both the pictures produced (such as diagrams, charts and animations) and the techniques and software used to generate and manipulate them.
(a)(ii) Two applications of computer graphics in advertising:
(b) One use of each graphics tool:
(c) Name one Fill Tool needed to:
Swali 3 Ripoti
(a) What are "Reports" in a database system?
(b) List four (4) ways in which Reports can be viewed in database management system.
(c) Outline the steps to prints a Report in MS Access.
(a) What are "Reports" in a database system?
A report is a database object used to organise, summarise and present data from one or more tables or queries in a formatted, printable layout. Reports are designed mainly for output: they allow the user to arrange records neatly, group and sort them, perform calculations such as totals and averages, and produce professional printed documents such as invoices, result sheets or mailing lists.
(b) Four ways in which reports can be viewed in a database management system (MS Access):
(c) Steps to print a report in MS Access:
Maelezo ya Majibu
(a) What are "Reports" in a database system?
A report is a database object used to organise, summarise and present data from one or more tables or queries in a formatted, printable layout. Reports are designed mainly for output: they allow the user to arrange records neatly, group and sort them, perform calculations such as totals and averages, and produce professional printed documents such as invoices, result sheets or mailing lists.
(b) Four ways in which reports can be viewed in a database management system (MS Access):
(c) Steps to print a report in MS Access:
Swali 4 Ripoti
Perform the following conversions in the stated number bases;
(a) AB1\(_{16}\) to Octal system
(b) 1110111.101\(_2\) to Denary system
(c) 507\(_2\) to Binary system.
(a) Convert \(AB1_{16}\) to the Octal system
Step 1: Write each hexadecimal digit as 4 binary bits.
\[A=1010,\quad B=1011,\quad 1=0001\]
\[AB1_{16}=1010\,1011\,0001_2\]
Step 2: Regroup the binary digits in threes from the right.
\[101\;010\;110\;001\]
Step 3: Convert each group of three to its octal digit.
\[101=5,\;010=2,\;110=6,\;001=1\]
\[\therefore AB1_{16}=5261_8\]
(b) Convert \(1110111.101_2\) to the Denary (base 10) system
Integer part, using place values \(64,32,16,8,4,2,1\):
\[1110111_2=64+32+16+0+4+2+1=119\]
Fractional part, using place values \(\tfrac{1}{2},\tfrac{1}{4},\tfrac{1}{8}\):
\[.101_2=1(0.5)+0(0.25)+1(0.125)=0.625\]
\[\therefore 1110111.101_2=119.625_{10}\]
(c) Convert \(507_8\) to the Binary system
Since the digit 7 is not valid in base 2, the number is in the octal system. Write each octal digit as 3 binary bits.
\[5=101,\quad 0=000,\quad 7=111\]
\[\therefore 507_8=101\,000\,111_2=101000111_2\]
Check by way of denary: \(507_8=5\times8^2+0\times8^1+7\times8^0=320+0+7=327_{10}\), and repeated division of \(327\) by 2 gives \(101000111_2\), confirming the result.
Maelezo ya Majibu
(a) Convert \(AB1_{16}\) to the Octal system
Step 1: Write each hexadecimal digit as 4 binary bits.
\[A=1010,\quad B=1011,\quad 1=0001\]
\[AB1_{16}=1010\,1011\,0001_2\]
Step 2: Regroup the binary digits in threes from the right.
\[101\;010\;110\;001\]
Step 3: Convert each group of three to its octal digit.
\[101=5,\;010=2,\;110=6,\;001=1\]
\[\therefore AB1_{16}=5261_8\]
(b) Convert \(1110111.101_2\) to the Denary (base 10) system
Integer part, using place values \(64,32,16,8,4,2,1\):
\[1110111_2=64+32+16+0+4+2+1=119\]
Fractional part, using place values \(\tfrac{1}{2},\tfrac{1}{4},\tfrac{1}{8}\):
\[.101_2=1(0.5)+0(0.25)+1(0.125)=0.625\]
\[\therefore 1110111.101_2=119.625_{10}\]
(c) Convert \(507_8\) to the Binary system
Since the digit 7 is not valid in base 2, the number is in the octal system. Write each octal digit as 3 binary bits.
\[5=101,\quad 0=000,\quad 7=111\]
\[\therefore 507_8=101\,000\,111_2=101000111_2\]
Check by way of denary: \(507_8=5\times8^2+0\times8^1+7\times8^0=320+0+7=327_{10}\), and repeated division of \(327\) by 2 gives \(101000111_2\), confirming the result.
Swali 5 Ripoti
(a)(i) What is Universal Serial Bus (USB)?
(ii) State two benefits of using USB connection between a computer and another device.
(b) In Table 1, three storage devices are described, Use it to answer questions 3(b)(i) and 3(b)(ii).
(i) In column 2, name the storage device being described in column 1.
(ii) Show the category of storage device being described in column 1 by ticking in any of the column 3, 4 or 5
| SN | 1 | 2 | 3 | 4 | 5 |
| Description of Storage Device | Name of Storage Device | Category of Storage Device | |||
| Primary | Secondary | Offline | |||
| 1 | Magnetic storage medium which is composed of a thin flexible disk sealed in a square plastic carrier. | ||||
| 2 | Optical media - which uses one spiral track.Red lasers are used to read and write data on the media surface and it makes use of dual-layering technology to increase the storage capacity to over 1 GB. | ||||
| 3 | Non-volatile memory chip which contents cannot be altered. It is often used to store the start-up routines in a computer (e.g the BIOS). | ||||
(a)(i) Universal Serial Bus (USB):
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Data | Data | Data |
| Data | Data | Data |
| Data | Data | Data |
Universal Serial Bus (USB) is a standard plug-and-play interface used to connect a computer to peripheral devices such as keyboards, mice, printers, scanners, flash drives, cameras and mobile phones for communication, data transfer and power supply.
(a)(ii) Benefits of USB connection:
(b) Identification and category of storage devices:
| SN | Description of Storage Device | Name of Storage Device | Primary | Secondary | Offline | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Magnetic storage medium which is composed of a thin flexible disk sealed in a square plastic carrier. | Floppy disk | ✓ | ||||||||||||||||||||||||||||||
| 2 | Optical media which uses one spiral track. Red lasers are used to read and write data on the media surface, and it makes use of dual-layering technology to increase storage capacity to over 1 GB. | DVD (Digital Versatile Disc) |
| Column 1 | Column 2 | Column 3 |
|---|---|---|
| Data | Data | Data |
| Data | Data | Data |
| Data | Data | Data |
Universal Serial Bus (USB) is a standard plug-and-play interface used to connect a computer to peripheral devices such as keyboards, mice, printers, scanners, flash drives, cameras and mobile phones for communication, data transfer and power supply.
(a)(ii) Benefits of USB connection:
(b) Identification and category of storage devices:
| SN | Description of Storage Device | Name of Storage Device | Primary | Secondary | Offline |
|---|---|---|---|---|---|
| 1 | Magnetic storage medium which is composed of a thin flexible disk sealed in a square plastic carrier. | Floppy disk | ✓ | ||
| 2 | Optical media which uses one spiral track. Red lasers are used to read and write data on the media surface, and it makes use of dual-layering technology to increase storage capacity to over 1 GB. | DVD (Digital Versatile Disc) |