Deck 2: Software Development Data Types and Expressions
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/50
العب
ملء الشاشة (f)
Deck 2: Software Development Data Types and Expressions
1
In general, a variable name must begin with either a letter or an underscore (_).
True
2
In the maintenance phase of the waterfall model, the parts of a program are brought together into a smoothly functioning whole, usually not an easy task.
False
3
The design phase of the waterfall model is also called the coding phase.
False
4
string is an example of a data type in Python.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
5
The + operator allows you to build a string by repeating another string a given number of times.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
6
When the Python interpreter evaluates a literal, the value it returns is simply that literal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
7
In Python, \b is a escape sequence that represents a horizontal tab.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
8
Computer scientists refer to the process of planning and organizing a program as software development.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
9
Expressions provide an easy way to perform operations on data values to produce other data values.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
10
1,500 is a valid integer literal in Python.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
11
In Python, a floating-point number must be written using scientific notation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
12
Text processing is by far the least common application of computing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
13
A variable associates a name with a value, making it easy to remember and use the value later in a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
14
Programs rarely work as hoped the first time they are run.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
15
Modern software development is usually incremental and iterative.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
16
Python is a loosely typed programming language.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
17
Variables receive their initial values and can be reset to new values with an assignment statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
18
Testing is a deliberate process that requires some planning and discipline on the programmer's part.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
19
The cost of developing software is spread equally over the phases.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
20
Real numbers have infinite precision, which means that the digits in the fractional part can continue forever.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
21
Which of the following is NOT a valid name that can be used for a variable?
A) total
B) 1ending
C) propertyValue
D) TEST
A) total
B) 1ending
C) propertyValue
D) TEST
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
22
Exponentiation and assignment operations are left associative.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
23
What effect does the following print statement have? print("Hello" * 5)
A) The string "Hello" is converted into an int type of value 1 and then multiplied by 5, producing "5".
B) The string is indexed and the character count is multiplied with the total number of characters in the string, producing "25".
C) The print statement produces a type error as you cannot multiply a string type with an integer type.
D) The print statement will produce "HelloHelloHelloHelloHello".
A) The string "Hello" is converted into an int type of value 1 and then multiplied by 5, producing "5".
B) The string is indexed and the character count is multiplied with the total number of characters in the string, producing "25".
C) The print statement produces a type error as you cannot multiply a string type with an integer type.
D) The print statement will produce "HelloHelloHelloHelloHello".
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
24
Which of the following functions and expressions will convert the ASCII character "Z" to its numeric equivalent ASCII code?
A) ord('Z')
B) chr('Z')
C) ord(chr('Z'))
D) chr(ord('Z'))
A) ord('Z')
B) chr('Z')
C) ord(chr('Z'))
D) chr(ord('Z'))
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
25
A semantic error is detected when the action that an expression describes cannot be carried out, even though that expression is syntactically correct.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
26
What statement accurately reflects the difference between the quotient operator and the division operator?
A) The two operators are effectively the same, unless being carried out on strings.
B) The quotient operator produces a float, while the division operator produces an integer.
C) The quotient operator produces a float, while the division operator produces an integer + remainder.
D) The quotient operator produces an integer, while the division operator produces a float.
A) The two operators are effectively the same, unless being carried out on strings.
B) The quotient operator produces a float, while the division operator produces an integer.
C) The quotient operator produces a float, while the division operator produces an integer + remainder.
D) The quotient operator produces an integer, while the division operator produces a float.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
27
What are the two different means by which a floating-point number can be written? (Choose two.)
A) decimal notation
B) line notation
C) scientific notation
D) octal notation
A) decimal notation
B) line notation
C) scientific notation
D) octal notation
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
28
In Python, what data type is used to represent real numbers between -10^308 and 10^308 with 16 digits of precision?
A) int
B) float
C) string
D) array
A) int
B) float
C) string
D) array
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
29
When attempting to produce a correct program, what is the point of developing a test suite?
A) To provide a small set of inputs as a test to verify that a program will be correct for all inputs.
B) To modify the running program's variables and verify that the program will still function, even if the code changes.
C) To test the outputs of a program against known values to verify that the math coprocessor is performing properly.
D) To test the code syntax for possible errors such as undefined variables.
A) To provide a small set of inputs as a test to verify that a program will be correct for all inputs.
B) To modify the running program's variables and verify that the program will still function, even if the code changes.
C) To test the outputs of a program against known values to verify that the math coprocessor is performing properly.
D) To test the code syntax for possible errors such as undefined variables.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
30
What special character does the '\b' escape sequence generate?
A) It generates a border special character.
B) It generates a bold special character, causing all text after the character to be bolded.
C) It denotes a block of text follows the escape sequence.
D) It produces a backspace special character, which performs the same function as the backspace key.
A) It generates a border special character.
B) It generates a bold special character, causing all text after the character to be bolded.
C) It denotes a block of text follows the escape sequence.
D) It produces a backspace special character, which performs the same function as the backspace key.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
31
In the waterfall development model, what is the most expensive part of software development?
A) The design phase.
B) The integration phase.
C) The maintenance phase.
D) The analysis phase.
A) The design phase.
B) The integration phase.
C) The maintenance phase.
D) The analysis phase.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
32
In Python, % is the exponentiation operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
33
The modulus operator has the highest precedence and is evaluated first.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
34
What statement accurately describes what a semantic error is?
A) A semantic error is the result of an expression that is syntactically incorrect.
B) A semantic error occurs when an expression is syntactically correct, but the expression cannot be carried out.
C) A semantic error happens when an expression attempts to perform operations between incompatible data types.
D) A semantic error is the result of an improperly nested if statement.
A) A semantic error is the result of an expression that is syntactically incorrect.
B) A semantic error occurs when an expression is syntactically correct, but the expression cannot be carried out.
C) A semantic error happens when an expression attempts to perform operations between incompatible data types.
D) A semantic error is the result of an improperly nested if statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
35
What function can you call inside of IDLE to show the resources of the math module, once it has been imported?
A) show(math)
B) list(math)
C) dir(math)
D) resource(math)
A) show(math)
B) list(math)
C) dir(math)
D) resource(math)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
36
Which of the following literals would be considered a float type in Python?
A) -1
B) 3.14
C) '88'
D) 5
A) -1
B) 3.14
C) '88'
D) 5
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
37
You can use parentheses to change the order of evaluation in an arithmetic expression.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
38
What print statement will output a single '\' character?
A) print('\')
B) print('\\')
C) print('"\"')
D) print('\\\')
A) print('\')
B) print('\\')
C) print('"\"')
D) print('\\\')
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
39
What must be done in order to concatenate a string and a float object?
A) Nothing can be done, as the two data types cannot be converted to a compatible type.
B) The string object must be converted to a float object via the float() function.
C) The float object must be converted to an integer object via the int() function.
D) The float object must be converted to a string object via the str() function.
A) Nothing can be done, as the two data types cannot be converted to a compatible type.
B) The string object must be converted to a float object via the float() function.
C) The float object must be converted to an integer object via the int() function.
D) The float object must be converted to a string object via the str() function.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
40
What is the largest value of an int data type in the Python programming language?
A) 2,147,483,647
B) 4,294,967,294
C) 2,147,483,647^100
D) The value is limited only by the memory of the host computer.
A) 2,147,483,647
B) 4,294,967,294
C) 2,147,483,647^100
D) The value is limited only by the memory of the host computer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
41
What term describes the process of substituting a simple process for a complex process in a program to make the program easier to understand and maintain?
A) refactoring
B) abstraction
C) inferring
D) subletting
A) refactoring
B) abstraction
C) inferring
D) subletting
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
42
You are working on a Python script that relies heavily on the cos and sin functions of the math module. As these are the only functions you require, what should you do to import only these functions, rather than the whole math module?
A) import cos, sin
B) import cos, sin from math
C) import math.cos, math.sin
D) from math import cos, sin
A) import cos, sin
B) import cos, sin from math
C) import math.cos, math.sin
D) from math import cos, sin
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
43
What will be the return value of running the following function? chr(ord('T') + 5)?
A) 78
B) \t
C) 0x89
D) "Y"
A) 78
B) \t
C) 0x89
D) "Y"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
44
Functions that are always available in Python come from what module?
A) main
B) internal
C) __builtin__
D) __system__
A) main
B) internal
C) __builtin__
D) __system__
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
45
How does the int function convert a float to an int?
A) By rounding to the nearest whole number.
B) By removing the fractional value of the number.
C) By rounding up to the closest whole number.
D) By rounding down to the closest whole number.
A) By rounding to the nearest whole number.
B) By removing the fractional value of the number.
C) By rounding up to the closest whole number.
D) By rounding down to the closest whole number.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
46
In Python, what does the "%" operator do in the expression 6 % 4?
A) It performs an exponentiation to the 4th power.
B) It returns a remainder or modulus.
C) It returns a float as a result of division.
D) It returns the percentage of the operation.
A) It performs an exponentiation to the 4th power.
B) It returns a remainder or modulus.
C) It returns a float as a result of division.
D) It returns the percentage of the operation.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
47
In evaluating the precedence rules used by Python, what statement is accurate?
A) Exponentiation has the highest precedence.
B) Multiplication is evaluated before unary multiplication.
C) Addition and subtraction are evaluated after assignment.
D) Exponentiation and assignment operations are left associative.
A) Exponentiation has the highest precedence.
B) Multiplication is evaluated before unary multiplication.
C) Addition and subtraction are evaluated after assignment.
D) Exponentiation and assignment operations are left associative.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
48
You are reviewing the code written by another programmer, and encounter a variable whose name is entirely in capital letters. What might you discern from this variable name?
A) The variable is a symbolic constant.
B) The variable is a reference variable.
C) The variable is part of a program loop.
D) The variable is used to store a dynamic value that is constantly changing.
A) The variable is a symbolic constant.
B) The variable is a reference variable.
C) The variable is part of a program loop.
D) The variable is used to store a dynamic value that is constantly changing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
49
What is the total number of distinct values in the ASCII set?
A) 64
B) 128
C) 256
D) 512
A) 64
B) 128
C) 256
D) 512
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck
50
What statement accurately describes the analysis phase of the waterfall model?
A) In this phase, the programmers determine what the program will do.
B) In this phase, the programmers determine how the program will do its task.
C) In this phase, the programmers receive a broad statement of a problem that may be solved by the development of a program.
D) In this phase, the programmers bring together the various parts of a program into a smoothly functioning whole.
A) In this phase, the programmers determine what the program will do.
B) In this phase, the programmers determine how the program will do its task.
C) In this phase, the programmers receive a broad statement of a problem that may be solved by the development of a program.
D) In this phase, the programmers bring together the various parts of a program into a smoothly functioning whole.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 50 في هذه المجموعة.
فتح الحزمة
k this deck