1/19
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
A console application runs
a. via a command prompt
b. through another application
c. through a browser
d. with a GUI
Answer: through a browser
Python is considered a good first language to learn because:
a. it has most of the features of traditional programming languages
b. it is open source
c. it has simple syntax
d. all of the above
Answer: all of the above
The goal of ________ is to fix all the errors in a program.
a. interpreting
b. editing
c. testing
d. debugging
Answer: testing
The following is an example of __________.
print("Hello out there!")# get inputname = input("Who are you?")print("Goodbye, " , name)
a. bytecode
b. shebang line
c. source code
d. Java code
Answer: source code
When an exception occurs while a program is running,
a. an error message is displayed on the console
b. the program crashes and an error message is displayed
c. the program crashes
d. an error message is displayed but the program continues
Answer: the program crashes and an error message is displayed
A web application runs
a. via a command prompt
b. through another application
c. through a browser
d. with a GUI
Answer: through a browser
To test a Python statement, you use:
a. IDLE's interactive shell
b. the command line
c. the F5 key
d. IDLE's editor
Answer: IDLE's interactive shell
The ________ software for a computer provides the software that's needed for running applications.
a. GUI
b. application
c. systems
d. operation
Answer: systems
Which type of errors must be fixed before the program can be compiled?
a. exceptions
b. logical errors
c. violations
d. syntax errors
Answer: syntax errors
To create a Python program, you use:
a. IDLE's interactive shell
b. the command line
c. IDLE's editor
d. the F5 key
Answer: IDLE's editor
Which of the following translates bytecode into instructions for the computer?
a. the computer's operating system
b. the IDE
c. the Python virtual machine
d. the Python interpreter
Answer: the Python virtual machine
A runtime error is also known as
a. a logical error
b. an exception
c. a violation
d. a syntax error
Answer: an exception
The following is an example of __________.
#!/usr/bin/env python 3
a. a shebang line
b. Java code
c. source code
d. bytecode
Answer: a shebang line
To run a Python program from IDLE, you use:
a. the F5 key
b. IDLE's interactive shell
c. IDLE's editor
d. the command line
Answer: the F5 key
The goal of ______ is to find all the errors in a program
a. debugging
b. interpreting
c. editing
d. testing
Answer: testing
The data in _____ is lost when an application ends.
a. the application software
b. the CPU
c. disk storage
d. main memory
Answer: main memory
Python relies on correct __________ to determine the meaning of a statement.
a. continuation
b. punctuation
c. comments
d. indentation
Answer: indentation
What, if anything, is wrong with this code?
student_score = int(input("Enter this student's score: "))
score = student_score + 5
print("With the 5-point curve, the student's score is ", scores, ".")
a. a string variable is used in an arithmetic expression
b. an undeclared variable name is used in the print() function
c. nothing is wrong with this code
d. the input() function is chained with the int() function
Answer: an undeclared variable name is used in the print() function
What will be the result of the following code if the user enters 81 at the prompt?
score_curve = 7
score = input("Enter your score on the exam: ")
score_curve += score
print(score_curve)
a. error: you cannot print a numeric variable
b. error: you cannot use the += operator to add a string variable to an int value
c. 81 will be displayed on the console
d. 88 will be displayed on the console
Answer: error: you cannot use the += operator to add a string variable to an int value
The data in __________ is persistent so it is not lost when an application ends.
a. the CPU
b. main memory
c. the application software
d. disk storage
Answer: disk storage