Deck 2: Input, Processing, and Output
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/35
العب
ملء الشاشة (f)
Deck 2: Input, Processing, and Output
1
The output of the following print statement is: print 'I\'m ready to begin'
A) Im ready to begin
B) I\'m ready to begin
C) I'm ready to begin
D) 'I\'m ready to begin'
A) Im ready to begin
B) I\'m ready to begin
C) I'm ready to begin
D) 'I\'m ready to begin'
C
2
The _____ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.
A) input
B) output
C) eval_input
D) string_input
A) input
B) output
C) eval_input
D) string_input
A
3
Python allows programmers to break a statement into multiple lines.
True
4
The _____ built-in function is used to read a number that has been typed on the keyboard.
A) input()
B) read()
C) get()
D) keyboard()
A) input()
B) read()
C) get()
D) keyboard()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
5
A(n) _____ is a diagram that graphically depicts the steps that take place in a program.
A) flowchart
B) algorithm
C) code
D) pseudocode
A) flowchart
B) algorithm
C) code
D) pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
6
The program development cycle is made up of _____ steps that are repeated until no errors can be found in the program.
A) five
B) four
C) three
D) six
A) five
B) four
C) three
D) six
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
7
After the execution of the following statement, the variable sold will reference the numeric literal value as a(n) _____ data type: sold = 256.752
A) int
B) float
C) str
D) currency
A) int
B) float
C) str
D) currency
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
8
The line continuation character is a _____.
A) #
B) %
C) &
D) \
A) #
B) %
C) &
D) \
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
9
Which mathematical operator is used to raise five to the second power in Python?
A) /
B) **
C) ^
D) ~
A) /
B) **
C) ^
D) ~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
10
What is the output of the following print statement? print('The path is D:\\sample\\test.')
A) 'The path is D:\\sample\\test.'
B) The path is D:\\sample\\test.
C) The path is D\\sample\\test.
D) The path is D:\sample\test.
A) 'The path is D:\\sample\\test.'
B) The path is D:\\sample\\test.
C) The path is D\\sample\\test.
D) The path is D:\sample\test.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
11
Python formats all floating-point numbers to two decimal places when outputting using the print statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
12
If value1 is 2.0 and value2 is 12, what is the output of the following command? print(value1 * value2)
A) 24
B) value1 * value2
C)24.0
D)2.0 * 12
A) 24
B) value1 * value2
C)24.0
D)2.0 * 12
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
13
What type of error produces incorrect results but does not prevent the program from running?
A) syntax
B) logic
C) grammatical
D) human
A) syntax
B) logic
C) grammatical
D) human
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
14
When using the camelCase naming convention, the first word of the variable name is written in lowercase letters and the first character of the second and subsequent words are written in uppercase letters.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
15
According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
16
In a print statement, you can set the _____ argument to a space or empty string to stop the output from advancing to a new line.
A) stop
B) end
C) separator
D) newLine
A) stop
B) end
C) separator
D) newLine
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
17
What is the informal language that programmers use to create models of programs that have no syntax rules and are not meant to be compiled or executed?
A) flowchart
B) Algorithm
C) Code
D) Pseudocode
A) flowchart
B) Algorithm
C) Code
D) Pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
18
After the execution of the following statement, the variable price will reference the value _____. price = int(68.549)
A) 68
B) 69
C)68.55
D)68.54
A) 68
B) 69
C)68.55
D)68.54
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
19
Comments in Python begin with the # character.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
20
What symbol is used to mark the beginning and end of a string?
A) Slash
B) Asterisk
C) Quotation
D) Comma
A) Slash
B) Asterisk
C) Quotation
D) Comma
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
21
A(n) _______________ character is a special character that is preceded with a backslash, appearing inside a string literal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
22
A(n) _______________ is a name that represents a value stored in the computer's memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
23
A flowchart is a tool that programmers use to design programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
24
The result of the expression 12.3 + 6.7 is _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
25
When the + operator is used with two strings, it performs string _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
26
A(n) _______________ is a single task that the program must perform in order to satisfy the customer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
27
In Python, math expressions are evaluated from left to right, no matter what the operators are.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
28
The \t escape character causes the output to skip over to the next horizontal tab.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
29
Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
30
When applying the .3f formatting specifier to the following number, 76.15854, the result is _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
31
Python uses _______________ to categorize values in memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
32
The _______________ specifier is a special set of characters that specify how a value should be formatted.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
33
_______________ are notes of explanation that document lines or sections of a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
34
The % symbol is the remainder operator and it is also known as the _______________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
35
In Python, print statements written on separate lines do not necessarily output on separate lines.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck