Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished it #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 33 additions & 17 deletions HW/1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ There are 30 marks available and are awarded grades as follows:
###1 - Why do we represent data using binary when using computers *(1 mark)*

```
answer here
Because the computer reads it as on or off
```
###2 - How would we represent the number 147 in binary? *(1 mark)*
```
answer here
10010011
```
###3 - Can you convert the hexadecimal number **b5** to denary, there is a mark for you working. *(2 marks)*
```
answer here
115
```
###4 - Here is a function written is **pseudocode**.
```
Expand All @@ -47,12 +47,12 @@ ENDFUNCTION

(a) What type of data is **users**? **(1 mark)**
```
answer here
String
```

(b) What type of data is returned by this function? **(1 mark)**
```
answer here
Boolean
```

##Errors
Expand All @@ -69,7 +69,7 @@ line7: OUTPT mean

(a) On which line is there a **syntax** error? **(1 mark)**
```
answer here
7
```

(b) What is meant by a **syntax** error? **(1 mark)**
Expand All @@ -79,46 +79,62 @@ answer here

(c) Identify a logical error in the program and suggest how this might be fixed. **(2 marks)**
```
answer here
4 it needs to be tot=tot <- nums[x]
```

(d) Describe and give an example of the 3rd kind of programming error. **(2 marks)**
```
answer here
run time divide by 0
```

##Algortithms
###7 - Write an **algorithm** that if given a list of numbers could find the largest. Try to use [pseudocode](http://filestore2.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF).
```
answer here
NumberList=[54,3,67,93,95,-64,7338,6.945,848,884,56565,334.34,56.34,45,-1]

isSorted=False

while isSorted==False:
for element in range(len(NumberList)-1):
if NumberList[element] > NumberList [element+1]:
isSorted=False
temp=NumberList[element]
NumberList[element] = NumberList[element+1]
NumberList[element+1] = temp
print(NumberList)

```

##Networking
###8 - Research the following methods (*topologies*) for connecting devices to a network. In each case give a description and at least 1 advantage and 1 disadvantage.

**Bus Topology (6 marks)**
```
Describe:
Describe:A bus network is a network topology in which nodes are connected in a daisy chain by a linear sequence of buses.

Advantages:


Advantages:
It works well for small networks.
Disadvantages:
Entire network shuts down if there is a break in the main cable
```

**Ring Topology (6 marks)**
```
Describe:
Describe:A ring network is a network topology in which each node connects to exactly two other nodes, forming a single continuous pathway for signals through each node - a ring. Data travel from node to node, with each node along the way handling every packet.

Advantages:
Advantages:Very orderly network where every device has access to the token and the opportunity to transmit

Disadvantages:
Disadvantages:Communication delay is directly proportional to number of nodes in the network
```

**Star Topology (6 marks)**
```
Describe:
Describe:Star networks are one of the most common computer network topologies.

Advantages:
Advantages:star topology prevents the passing of data packets through an excessive number of nodes. At most, 3 devices and 2 links are involved in any communication between any two devices. Although this topology places a huge overhead on the central hub, with adequate capacity, the hub very high utilization by one device without affecting others.

Disadvantages:

Disadvantages:Failure of the central hub renders the network inoperable
```