Deck 2: Input, Processing, and Output

ملء الشاشة (f)
exit full mode
سؤال
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
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Comments in Python begin with the # character.
سؤال
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
سؤال
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.
سؤال
The line continuation character is a _____.

A) #
B) %
C) &
D) \
سؤال
Python formats all floating-point numbers to two decimal places when outputting using the print statement.
سؤال
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.
سؤال
What symbol is used to mark the beginning and end of a string?

A) Slash
B) Asterisk
C) Quotation
D) Comma
سؤال
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'
سؤال
Python allows programmers to break a statement into multiple lines.
سؤال
What type of error produces incorrect results but does not prevent the program from running?

A) syntax
B) logic
C) grammatical
D) human
سؤال
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
سؤال
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
سؤال
Which mathematical operator is used to raise five to the second power in Python?

A) /
B) **
C) ^
D) ~
سؤال
A(n) _____ is a diagram that graphically depicts the steps that take place in a program.

A) flowchart
B) algorithm
C) code
D) pseudocode
سؤال
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()
سؤال
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
سؤال
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
سؤال
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
سؤال
According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.
سؤال
Python uses _______________ to categorize values in memory.
سؤال
When applying the .3f formatting specifier to the following number, 76.15854, the result is _______________.
سؤال
A flowchart is a tool that programmers use to design programs.
سؤال
The % symbol is the remainder operator and it is also known as the _______________ operator.
سؤال
The _______________ specifier is a special set of characters that specify how a value should be formatted.
سؤال
_______________ are notes of explanation that document lines or sections of a program.
سؤال
A(n) _______________ character is a special character that is preceded with a backslash, appearing inside a string literal.
سؤال
The result of the expression 12.3 + 6.7 is _______________.
سؤال
The \t escape character causes the output to skip over to the next horizontal tab.
سؤال
A(n) _______________ is a single task that the program must perform in order to satisfy the customer.
سؤال
When the + operator is used with two strings, it performs string _______________.
سؤال
A(n) _______________ is a name that represents a value stored in the computer's memory.
سؤال
In Python, print statements written on separate lines do not necessarily output on separate lines.
سؤال
Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.
سؤال
In Python, math expressions are evaluated from left to right, no matter what the operators are.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/35
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 2: Input, Processing, and Output
1
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
C
2
Comments in Python begin with the # character.
True
3
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
B
4
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
5
The line continuation character is a _____.

A) #
B) %
C) &
D) \
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
6
Python formats all floating-point numbers to two decimal places when outputting using the print statement.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
7
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.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
8
What symbol is used to mark the beginning and end of a string?

A) Slash
B) Asterisk
C) Quotation
D) Comma
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
9
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'
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
10
Python allows programmers to break a statement into multiple lines.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
11
What type of error produces incorrect results but does not prevent the program from running?

A) syntax
B) logic
C) grammatical
D) human
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
12
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
13
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which mathematical operator is used to raise five to the second power in Python?

A) /
B) **
C) ^
D) ~
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
15
A(n) _____ is a diagram that graphically depicts the steps that take place in a program.

A) flowchart
B) algorithm
C) code
D) pseudocode
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
16
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()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
17
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
18
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
19
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
20
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
21
Python uses _______________ to categorize values in memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
22
When applying the .3f formatting specifier to the following number, 76.15854, the result is _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
23
A flowchart is a tool that programmers use to design programs.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
24
The % symbol is the remainder operator and it is also known as the _______________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
25
The _______________ specifier is a special set of characters that specify how a value should be formatted.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
26
_______________ are notes of explanation that document lines or sections of a program.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
27
A(n) _______________ character is a special character that is preceded with a backslash, appearing inside a string literal.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
28
The result of the expression 12.3 + 6.7 is _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
29
The \t escape character causes the output to skip over to the next horizontal tab.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
30
A(n) _______________ is a single task that the program must perform in order to satisfy the customer.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
31
When the + operator is used with two strings, it performs string _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
32
A(n) _______________ is a name that represents a value stored in the computer's memory.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
33
In Python, print statements written on separate lines do not necessarily output on separate lines.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
34
Computer programs typically perform three steps: Input is received, some process is performed on the input, and output is produced.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
35
In Python, math expressions are evaluated from left to right, no matter what the operators are.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 35 في هذه المجموعة.