Deck 1: Introduction to Python: Introduction to Numeric Types, Turtle Graphics, Simple for Loops and Functions
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/34
العب
ملء الشاشة (f)
Deck 1: Introduction to Python: Introduction to Numeric Types, Turtle Graphics, Simple for Loops and Functions
1
How does your text differentiate the three levels of problem-solving?
A) Input, variables, and output
B) Strategy, tactics, and tools
C) Algorithms, programs, and plans
D) Analysis, implementation, and execution
A) Input, variables, and output
B) Strategy, tactics, and tools
C) Algorithms, programs, and plans
D) Analysis, implementation, and execution
B
2
You are working out a solution to a problem with the tips given in Chapter 1 of your text. What technique enables you to go from some specific examples of a solution-to a solution that can be implemented as a program?
A) Generalization
B) Simplification
C) Representation
D) Visualization
A) Generalization
B) Simplification
C) Representation
D) Visualization
A
3
You can type commands interactively at the Python shell by opening the Python interpreter and starting a(n):
A) expression.
B) listing.
C) session.
D) object.
A) expression.
B) listing.
C) session.
D) object.
C
4
Whole numbers in Python are called:
A) complex numbers.
B) decimals.
C) floating point numbers.
D) integers.
A) complex numbers.
B) decimals.
C) floating point numbers.
D) integers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
5
You have entered a calculation in the Python interpreter. To see the result of this calculation, which key would you press?
A) Spacebar
B) Tab
C) Enter (or Return)
D) =
A) Spacebar
B) Tab
C) Enter (or Return)
D) =
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
6
What is the Python prompt?
A) >>
B) >>>
C) #
D) //
A) >>
B) >>>
C) #
D) //
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
7
What is the result of the expression 15//2?
A) 1
B) 7
C) 7.7
D) 30
A) 1
B) 7
C) 7.7
D) 30
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
8
What is the result of the expression 15/2?
A) 1
B) 7
C) 7.5
D) 8
A) 1
B) 7
C) 7.5
D) 8
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
9
What do you use to associate an object name with an expression in Python?
A) Object space
B) Key label
C) Assignment statement
D) Abstract reference
A) Object space
B) Key label
C) Assignment statement
D) Abstract reference
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
10
The name that allows us to locate a Python object is a(n):
A) algorithm.
B) assignment.
C) operand.
D) variable.
A) algorithm.
B) assignment.
C) operand.
D) variable.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
11
Case Study 1:
Consider the following sequence of assignment statements:
>>> x = 15
>>> y = 25
>>> x = y
-What is the value of x after the first line?
A) 0
B) 15
C) 25
D) y
Consider the following sequence of assignment statements:
>>> x = 15
>>> y = 25
>>> x = y
-What is the value of x after the first line?
A) 0
B) 15
C) 25
D) y
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
12
Case Study 1:
Consider the following sequence of assignment statements:
>>> x = 15
>>> y = 25
>>> x = y
-What is the value of x after the last line?
A) 0
B) 15
C) 25
D) z
Consider the following sequence of assignment statements:
>>> x = 15
>>> y = 25
>>> x = y
-What is the value of x after the last line?
A) 0
B) 15
C) 25
D) z
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
13
Case Study 2:
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-One of the attributes of a turtle is:
A) color.
B) forward.
C) down.
D) dot.
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-One of the attributes of a turtle is:
A) color.
B) forward.
C) down.
D) dot.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
14
Case Study 2:
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-The turtle method ____ does not take any parameters.
A) forward
B) position
C) right
D) fillcolor
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-The turtle method ____ does not take any parameters.
A) forward
B) position
C) right
D) fillcolor
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
15
Case Study 2:
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-Assume you have created a turtle instance. What is the result of calling the position method?
A) (0.0)
B) (0.00, 0.00)
C) (50.00, 50.00)
D) (100.00, 100.00)
The turtle module provides us with a simple graphics programming tool known as a "turtle." Very simply, a turtle is an object that we can control. A turtle can move forward or backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down. A turtle object has both attributes and methods.
-Assume you have created a turtle instance. What is the result of calling the position method?
A) (0.0)
B) (0.00, 0.00)
C) (50.00, 50.00)
D) (100.00, 100.00)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
16
Consider the following for loop template. How many times will statement1 be executed?
For i in range(5):
Statement1
Statement2
)..
A) 0
B) 1
C) 5
D) n
For i in range(5):
Statement1
Statement2
)..
A) 0
B) 1
C) 5
D) n
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
17
Given the following function definition, which of the statements below produces a square?
Def drawPolygon(myTurtle, sideLength, numSides):
TurnAngle = 360 / numSides
For i in range(numSides):
MyTurtle.forward(sideLength)
MyTurtle.right(turnAngle)
A) drawPolygon(t, 100, 4)
B) drawPolygon(t, 100, 8)
C) drawPolygon(t, 50, 20)
D) drawPolygon(t, 20, 20)
Def drawPolygon(myTurtle, sideLength, numSides):
TurnAngle = 360 / numSides
For i in range(numSides):
MyTurtle.forward(sideLength)
MyTurtle.right(turnAngle)
A) drawPolygon(t, 100, 4)
B) drawPolygon(t, 100, 8)
C) drawPolygon(t, 50, 20)
D) drawPolygon(t, 20, 20)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
18
Machine learning is providing key help on the forefront of diagnosing disease.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
19
The best way to learn Python is to read through a textbook before typing any commands to ensure that you understand the key concepts first.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
20
At a high level, the Python interpreter simply does two things over and over again: (1) read and (2) write.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
21
When converting floating-point numbers to integers, Python always truncates the fractional part of the number.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
22
The Python language contains many abstractions that are built by using Python elements. In other words, much of Python is written in Python.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
23
1. Match each definition with its term.
-Used by Python to classify different kinds of objects.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
-Used by Python to classify different kinds of objects.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
24
1. Match each definition with its term.
-A combination of operators and operands.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
-A combination of operators and operands.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
25
1. Match each definition with its term.
-The name found on the left side of the equals sign in an expression.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
-The name found on the left side of the equals sign in an expression.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
26
1. Match each definition with its term.
-A method that creates a new object.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
-A method that creates a new object.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
27
1. Match each definition with its term.
-Step-by-step instructions that provide a solution to a problem.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
-Step-by-step instructions that provide a solution to a problem.
A) Type
B) Expression
C) Variable
D) Constructor
E) Program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
28
Illustrate how computer science is used every day with an example.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
29
You have been asked to answer the following question: "A class has 12 students. At the beginning of class, each student shakes hands with each of the other students. How many handshakes take place?" Explain how you would use a simplification strategy to answer this question.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
30
Describe the types of primitive objects that Python provides for working with numbers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
31
Explain how the Python interpreter evaluates the statement below.
name = python expression
name = python expression
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
32
Describe the rules that Python imposes on the possible values for name in the statement below.
name = python expression
name = python expression
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
33
What is abstraction, and how does this concept relate to a "black box?"
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck
34
The expression turtle.Turtle() contains the dot(.) operator. What is the purpose of this operator?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 34 في هذه المجموعة.
فتح الحزمة
k this deck