From 9111130383654e394e0a0199e15d484caa433f37 Mon Sep 17 00:00:00 2001 From: dmulgrew7138 Date: Tue, 24 Jun 2014 10:51:27 +0100 Subject: [PATCH 1/3] Homework --- HW/2/tables.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HW/2/tables.py b/HW/2/tables.py index 0b91656..161bda8 100644 --- a/HW/2/tables.py +++ b/HW/2/tables.py @@ -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) From 7c9fcbc3c83b1ed90e7a02b20e2d482ef9d20971 Mon Sep 17 00:00:00 2001 From: dmulgrew7138 Date: Fri, 11 Jul 2014 11:29:37 +0100 Subject: [PATCH 2/3] Update README.md --- HW/1/README.md | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/HW/1/README.md b/HW/1/README.md index c646fcf..33e6ef7 100644 --- a/HW/1/README.md +++ b/HW/1/README.md @@ -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) @@ -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: @@ -68,19 +58,13 @@ 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 -``` +v (d) Describe and give an example of the 3rd kind of programming error. **(2 marks)** ``` From 4f458f8f6dc08509a8489bd9cc43df85c297525a Mon Sep 17 00:00:00 2001 From: dmulgrew7138 Date: Mon, 1 Sep 2014 00:15:59 +0100 Subject: [PATCH 3/3] Update README.md --- HW/1/README.md | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/HW/1/README.md b/HW/1/README.md index 33e6ef7..fc1db1f 100644 --- a/HW/1/README.md +++ b/HW/1/README.md @@ -64,25 +64,23 @@ line7 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)** -v - +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: