Preskoči na glavni sadržaj
Prijava
Sign up for FREE
arrow_back
Biblioteka

11 CS - End of unit 8 test (with Q's on unit 2)

star
star
star
star
star
Posljednje ažuriranje about 1 year ago
12

Answer all the questions.

4
6
6
3
6
4
3
2
3
2
6
7
Pitanje 1
1.

Variables and constants are used for data storage in computer programs.

Discuss the similarities and differences between these data stores. [4]

Pitanje 2
2.

A programmer is writing a program that stores data about items stored in a warehouse. Suggest suitable data types for:

String

Integer

Boolean

Item name

Manufacturer

Description

Number in stock

Reorder level

Whether the item is on order or not

Pitanje 3
3.

Write a short pseudocode algorithm to input a password, check that it has exactly 8 characters in it, check that all the letters are upper case, and output the message "Password meets the rules" if both these conditions are true. [6]

Pitanje 4
4.

A computer file, "Message.txt", stores a line of text.

Write an algorithm in pseudocode to display this line of text. [3]

Pitanje 5
5.

a) Describe the purpose of each statement in this algorithm. [2]

b) Identify, using pseudocode, another loop structure that the algorithm in part a could have used. [1]

c) Write an algorithm, using pseudocode, to input a number between 0 and 100 inclusive. The algorithm should prompt for the input and output an error message if the number is outside this range. [3]

Pitanje 6
6.

Explain why programmers find library routines useful when writing programs. Include in your answer with two examples of library routines that programmers frequently use. [4]

Pitanje 7
7.

A system uses even parity.

Indicate whether the following bytes would fail or pass an even parity check:

a)

b)

c)

Pitanje 8
8.

Explain the term data packet.

Pitanje 9
9.

Data packets contain a header.

Name three components that you would expect to find in a header.

Pitanje 10
10.

Data packets also have a payload and a trailer.

Explain these two terms.

Pitanje 11
11.

Match the description of transmission taking place with correct term:

Stavka koja se može prevućiarrow_right_altOdgovarajuća stavka

Data sent one bit at a time down a single wire in both directions, but not at the same time

arrow_right_alt

Simplex, Serial

Data sent one bit at a time down a single wire in one direction only

arrow_right_alt

Full duplex, Serial

Data sent 16 bits at a time down 16 wires in both directions simultaneously

arrow_right_alt

Half duplex, Serial

Data sent 8 bits at a time down 8 wires in one direction only

arrow_right_alt

Half duplex, Parallel

Data sent 16 bits at a time down 16 wires in both directions, but not at the same time

arrow_right_alt

Full duplex, Parallel

Data sent one bit at a time down a single wire in both directions simultaneously

arrow_right_alt

Simplex, Parallel

Pitanje 12
12.

Indicate which statements about USB are True and which statements are False:

True

False

USBs use a protocol that allows for error-free data transmission between device and computer

USBs can support any cable length between device and computer

USBs use serial data transfer

USB connections can transfer data using half-duplex or full-duplex

It is difficult to add more USB ports to a computer using USB hubs

USB data transfer rates are much faster than, for example, Ethernet connections

There is no need for devices to have a power source because USB cable supplies 5V of power