Edhesive 1.1 - 1.3

Edhesive 1.1 - 1.3

10th Grade

8 Qs

quiz-placeholder

Similar activities

CS Edexcel 1.2a Writing Algorithms

CS Edexcel 1.2a Writing Algorithms

9th - 10th Grade

13 Qs

Exam Style Questions

Exam Style Questions

10th - 12th Grade

12 Qs

Small Basic (Turtle)

Small Basic (Turtle)

KG - University

10 Qs

Programming - Output

Programming - Output

KG - 12th Grade

12 Qs

Computational Thinking

Computational Thinking

9th - 11th Grade

12 Qs

Year 8 Quiz 1

Year 8 Quiz 1

9th - 12th Grade

10 Qs

Introduction to programming

Introduction to programming

5th - 10th Grade

10 Qs

C++ quiz

C++ quiz

10th Grade - Professional Development

10 Qs

Edhesive 1.1 - 1.3

Edhesive 1.1 - 1.3

Assessment

Quiz

Computers

10th Grade

Medium

Created by

Stephanie Lugo

Used 15+ times

FREE Resource

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A program that Thomas has written is complete. It has been tested thoroughly, and some outputs were not as expected. Thomas is now going through the code carefully attempting to establish the cause of these errors and change the code to remove them. What is this procedure called?

Debugging

Development

Coding

Error Check

Answer explanation

This is correct. Errors in code causing the program to behave in incorrect ways (e.g. calculating incorrect values or crashing) are called “bugs”. The process of finding these errors and correcting them is known as “debugging”.

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Understanding of the life cycle of a program is an essential component to becoming an effective programmer. Which of the following is the best

Idea→write code→algorithm→execute code→debug→maintain

Idea→algorithm→write code→execute code→debug→maintain

Idea→algorithm→write code→execute code→maintain→debug

Idea→algorithm→write code→debug→execute code→maintain

Answer explanation

This is correct. Every program begins with an idea: something which the programmer would like to achieve using this program. Before writing code the programmer should consider the logical and mathematical steps that the program would need to take to achieve this goal: this describes an algorithm. Then this algorithm can be implemented by writing it using code. Once created the code can be executed (run) and the results observed. If these results are not as expected (i.e. the program does no do what it was supposed to do) the programmer will need to debug this code to remove any errors. Once the code has been debugged it can be released, however a good programmer will maintain their code, ensuring it meets the latest standards for compatibility and removing any user reported bugs that might occur.

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Jeremiah is part of a group planning a summer fair at which local businesses can run stalls and events. He wants to use his programming skills to develop an app for the fair which businesses will be able to use to communicate information about their activities at the fair with visitors. Which of the following would be the best first step for Jeremiah to take?

Find out from the businesses and potential visitors what information and format they think should be used for the app

Write some sample code to understand how the app might work

Develop all of the major algorithms which will be required for the app by drawing flowchart representations

Write thorough documentation explaining how the code for the app works

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Consider the following two implementations of the same algorithm, each written in a different language.


Language A:

Calculate the average daily rainfall for the week (averageRainfall) by adding together the rainfall totals for each of the 7 days of the week (sun, mon, tue, wed, thu, fri, and sat) and dividing the sum by 7.


Language B:

Take the total amount of rain from each day of the week (sunday, monday, tuesday, wednesday, thursday, friday and saturday) and then average them together to get the average daily rainfall for the week (averageRainfall).


Which of the following statements about these two implementations is true?

Language A is ambiguous because it is unclear what sun, mon, tue, wed, thu, fri, and sat refer to in context with the problem.

The algorithms in both languages are ambiguous because they do not specify the actual values of the seven daily rainfall totals.

Language B is ambiguous because the process of “average” is not explained well

Neither of these languages is clear enough that a programmer could write a correct solution in a high-level programming language.

Answer explanation

This is correct. The terminology “average them together” is quite ambiguous, especially since more than one type of “average” exists. This might make it difficult for a programmer to write code that gives the result desired by the person writing this statement.

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following is the MOST important reason computers use artificial languages over natural language?

The syntax of artificial languages is explicit and unambiguous

The meaning of different characters and words in an artificial languages is explicit and unambiguous

The meaning of different characters and words in an artificial languages is too complicated

The syntax of natural languages is easy to translate by computers

Answer explanation

This is correct. An artificial language, such as a programming language, is much easier for computers to understand as the syntax can be made unambiguous: a series of well-defined rules allow each expression to always be interpreted in the same way by the computer.

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following best describes high-level computing languages?

They evolve naturally over time

They are extremely difficult for humans to read and understand

They are very easy for machines to understand and parse

They are not very ambiguous

Answer explanation

This is correct. Computer programming languages, in contrast to natural languages, are designed to be as unambiguous as possible. This applies to both low-level and high-level languages.

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

A statistics teacher wishes to create a program on her calculator that generates a random even integer. The command built in the calculator to generate a random positive integer is RANDOM(a,b). This command generates a random integer between integers a and b (and including a and b). Which of the following lines of code will ensure that the random integer generated will be even?

RANDOM(a,b) * 2

RANDOM(a,b) + 2

RANDOM(a,b) + 1

RANDOM(a,b) - 2

Answer explanation

This is correct. The command * typically represents multiplication. Therefore the command RANDOM(a,b) * 2 generates a random integer between a and b inclusive, then multiplies this integer by 2. This will always result in an even number answer.

8.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following should be true of any algorithm?


I. The order in which the steps making up the algorithm are followed is logically determined


II. Following the instructions in the algorithm will always result in the same outputs, regardless of any inputs


III. The instructions in the algorithm contain all necessary information to be implemented

I only

I and III only

II and III only

I, II and III

Answer explanation

This is correct. The instructions in an algorithm are followed in a logical order, determined by sequencing, selection and iteration. The instructions should be possible to execute from the information given in any algorithm.