Computers and Technology
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.

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, 2alshawe201
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
image
Computers and Technology, 23.06.2019 02:00, mayapril813
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
image
Computers and Technology, 24.06.2019 06:50, emmv565628
What are the things you are considering before uploading photos on social media?
Answers: 1
image
Computers and Technology, 24.06.2019 23:30, ninja12302
Does anyone have the problem where you try to watch a video to get your answer but it brings up a thing asking your gender to make ads relevant but it doesn't load? btw i won't be able to see the answer so use the comments .
Answers: 1
Do you know the correct answer?
1. Your task is to write a function that finds the smallest number in a list of numbers. What is the...

Questions in other subjects:

Konu
Mathematics, 02.11.2021 01:30