Intro to Coding - Types of Errors

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which of the following responses to an error alert are appropriate? Choose all that apply. Run the program with test data to verify the results and trace the source of the problem. Verify that variable names are spelled correctly. Search for language that does not follow the programming language conventions. Read the alert and see if the problem happens again before taking any action.

1. Run the program with test data to verify the results and trace the source of the problem. 2. Verify that variable names are spelled correctly. 3. Search for language that does not follow the programming language conventions.

Which of the following are recommended ways to address run-time errors? Choose all that apply. Delete the suspect lines of code and issue the program without that function. Add error routines that allow the program to execute fully even when unanticipated data is entered. Create error messages to alert the user to an error in data entry. Create controls in the program that ensure the input of proper data.

2. Add error routines that allow the program to execute fully even when unanticipated data is entered. 3. Create error messages to alert the user to an error in data entry. 4. Create controls in the program that ensure the input of proper data.

Which of the following can cause a run-time error? A programmer anticipated a positive whole number, and the user input a negative decimal value. A programmer anticipated text data, and the user input text data. A programmer anticipated numeric data, and the user input numeric data. A variable was not defined because of a typographical error in the definition of that variable.

1. A programmer anticipated a positive whole number, and the user input a negative decimal value.

Which of the following are causes of a run-time error. Choose all that apply. A user enters a numeric value when a text value was expected. A user enters text and numeric values. A user enters a text value when a numeric value was expected. A user enters a negative number when a positive number was expected.

1. A user enters a numeric value when a text value was expected. 3. A user enters a text value when a numeric value was expected. 4. A user enters a negative number when a positive number was expected.

Which of the following are recommended ways to find logic errors in code? Choose all that apply. Check the code line by line. Use the stepping function of your compiler to help you spot the error. Wait for an error message to show you what error is occurring. Run a test scenario with a sample data set to confirm if there is a logic error.

1. Check the code line by line. 2. Use the stepping function of your compiler to help you spot the error. 4. Run a test scenario with a sample data set to confirm if there is a logic error.

Which of the following effects do errors have on a computer program? Choose all that apply. Errors can cause a program to crash during execution. Errors can cause a program to run smoothly and deliver anticipated results. Errors can cause a program to deliver incorrect results. Errors can cause an error message to appear.

1. Errors can cause a program to crash during execution. 3. Errors can cause a program to deliver incorrect results. 4. Errors can cause an error message to appear.

Using the drop-down menus, complete these sentences defining the three common types of programming errors. ? are due to a mistake in the program; they do not cause the program to stop running, but they do produce unintended results ? are due to mistakes in the execution of commands; they cause the running of the program to halt. ? are due to misuse of the conventions of the programming language.

1. Logic errors 2. Run-time errors 3. Syntax errors

Which of the following statements are true of logic errors? Choose all that apply. Logic errors occur when the written instructions do not instruct the program to take the intended step. Logic errors can be ignored because they are difficult to locate. Logic errors often do not generate error messages. Logic errors result in unintended results.

1. Logic errors occur when the written instructions do not instruct the program to take the intended step. 3. Logic errors often do not generate error messages. 4. Logic errors result in unintended results.

Identify the correct statements about run-time errors. Choose all that apply. Run-time errors occur when the program is running. Run-time errors cause the program to halt. Run-time errors cause the program to restart. Run-time errors occur when a numeric value is expected but a text value is entered. Run-time errors occur when a text value is expected but a numeric value is entered. Run-time errors cause the program to run fast.

1. Run-time errors occur when the program is running. 2. Run-time errors cause the program to halt. 4. Run-time errors occur when a numeric value is expected but a text value is entered. 5. Run-time errors occur when a text value is expected but a numeric value is entered.

Programming errors can result in a number of different conditions. Choose all that apply. The program will halt execution. An error message will be displayed. Incorrect results will occur. Code will run faster.

1. The program will halt execution. 2. An error message will be displayed. 3. Incorrect results will occur.

Which of the following are likely to be considered when addressing logic errors in code? Choose all that apply. Your original program may need changes. You must check the accuracy of your arithmetic. The code may need to be tested and retested. You may find the code is illogical.

1. Your original program may need changes. 3. The code may need to be tested and retested.

Identify the characteristics of syntax errors. Choose all that apply. programmer did not follow the program language conventions may be highlighted while writing the program can be caused by mistyping or misspelling while writing the program does not cause an error message

1. programmer did not follow the program language conventions 2. may be highlighted while writing the program 3. can be caused by mistyping or misspelling while writing the program

What are the likely causes of syntax errors? Choose all that apply. reversed or missing parentheses, brackets, or quotation marks spaces where they should not be properly spelled and capitalized command words command words that are misspelled or missing required capitalization

1. reversed or missing parentheses, brackets, or quotation marks 2. spaces where they should not be 4. command words that are misspelled or missing required capitalization

Looking at the example of the programming error to the right, identify the type of error. run-time error syntax error logic error format error

1. run-time error oopsie! did you get it wrong? its actually 2. syntax error lol

Using the drop-down menus, correctly complete the sentences about run-time errors. A programmer can test the code to find run-time errors by ? A Beta version of a program is one that is ? Prior to release, programmers can test a program by ?

1. running the code with extreme values 2. nearly ready for release and has Beta users to test the program 3. running it with extreme input

Which of the following are reasons to release a Beta version of a computer program? Choose all that apply. to allow Beta testers to use the program to discover any errors and report bugs that need to be fixed to retain contractors to input data to provide one more method to uncover program errors that require fixes to make available price-discounted versions of the program

1. to allow Beta testers to use the program to discover any errors and report bugs that need to be fixed 3. to provide one more method to uncover program errors that require fixes

Using the drop-down menus, select the best word or phrase that correctly completes each sentence. It is ? to avoid all computer-programming errors. Computer-programming errors must be ? for a program to execute correctly and return anticipated results.

1. very unlikely 2. discovered and corrected

Looking at the example of the programming error to the right, identify the type of error. run-time error syntax error logic error format error

2. syntax error

Which of the following are the three most common types of programming errors? executable, bugs, and misspelling errors syntax, run-time, and logic errors coding, user, and computer errors error messages, highlighting, and faulty results

2. syntax, run-time, and logic errors

Which of the following is true about syntax errors? All programs use the same syntax, so all syntax errors are the same. All programs use different syntax, but all syntax errors are the same. Syntax errors are specific to a specific programming language. Some programs do not have a syntax.

3. Syntax errors are specific to a specific programming language.


Conjuntos de estudio relacionados

Quiz 1 Chapter 16 Lab 19 Endocrine

View Set

Exploring the Religions of Our World Chapter 2

View Set

Interest Rates and Bond Valuation

View Set

Chapter 8: Performance Management

View Set