subject
Computers and Technology, 25.11.2021 23:30 phavion

1. Your task is to write a function that finds the smallest number in a list of numbers. What is the best way to declare a temporary variable and why? a) Declare it as a local variable because it makes it easier to read the code.
b) Declare it as a local variable because using less memory is preferred.
c) Declare it as a global variable since it is easier to comment and faster to read.
d) Declare it as a global variable since these variables translate easier into machine code.

2. What type of variables are defined outside of a function?
a) Global
b) Inner
c) Local
d) Outer

3. Which of the following cannot be a variable name in Python?
a) addre55
b) Phone_123
c) userNAME
d) zip Code

4. When designing a program, it is good practice to find and reduce the amount of repetitive code. What is this practice called?
a) Code reduction
b) Deduplicating
c) Reducing repetition
d) Simplification

5. Explain how you would define a variable named balance, assuming that it will only be accessed in a single function.
a) Balance should be a global variable held in memory until the execution ends.
b) Balance should be a global variable on a hard drive to save memory.
c) Balance should be a local variable held in memory, so the code runs quickly.
d) Balance should be a local variable in the function, so it saves memory.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
What “old fashioned” features of checking accounts is p2p replacing
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Need asap write a short paper describing the history and differences between six sigma, waterfall, agile, and scrum models. understanding these models can give you a good idea of how diverse and interesting it development projects can be. describe what the rationale for them is and describe their key features. describe the history behind their development. at least 400 words
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
How can you repin an image on your pinterest pin board a. click on the "repin" button b. click on the "add pin" button c. click on the "upload a pin" button d. click on the "save pin" button.
Answers: 2
You know the right answer?
1. Your task is to write a function that finds the smallest number in a list of numbers. What is the...
Questions
question
Mathematics, 26.12.2019 20:31
question
Mathematics, 26.12.2019 20:31