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

Homework #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
46 changes: 14 additions & 32 deletions HW/1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ There are 30 marks available and are awarded grades as follows:
##Data Representation

###1 - Why do we represent data using binary when using computers *(1 mark)*

```
answer here
```
Because computers read 1s and zeros or on and offs.
###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
```
181
###4 - Here is a function written is **pseudocode**.
```
FUNCTION validUser (users , user)
Expand All @@ -47,13 +40,10 @@ ENDFUNCTION

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

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

##Errors
###6 - This program is supposed to find the mean of a list of numbers and print it out for the user:
Expand All @@ -68,37 +58,29 @@ line7: OUTPT mean
```

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

(b) What is meant by a **syntax** error? **(1 mark)**
```
answer here
```
Where the user has mistyped or misused a symbol or character and the program cannot run.

(c) Identify a logical error in the program and suggest how this might be fixed. **(2 marks)**
```
answer here
```

The mean is eq
(d) Describe and give an example of the 3rd kind of programming error. **(2 marks)**
```
answer here
```
A run time error, this type of area is quite common and occurs whenever the program tells the computer to do something that it is not designed to do.

##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
```
FUNCTION num_list_sort
listofnumbers <- user input



##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 where all the machines, servers and printers

Advantages:

Expand Down
4 changes: 4 additions & 0 deletions HW/2/tables.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
#paste code here
timesNumber = int(input("What number would you like to times: "))
numberTO = int(input("How far do you want to go up to: "))
for x in range(1,(numberTO+1)):
print(timesNumber * x)