Exam 1: Introduction to Python: Introduction to Numeric Types, Turtle Graphics, Simple for Loops and Functions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

You can type commands interactively at the Python shell by opening the Python interpreter and starting a(n):

(Multiple Choice)
4.8/5
(34)

The name that allows us to locate a Python object is a(n):

(Multiple Choice)
4.9/5
(34)

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.

(True/False)
4.8/5
(41)

1. Match each definition with its term. -Used by Python to classify different kinds of objects.

(Multiple Choice)
4.8/5
(36)

At a high level, the Python interpreter simply does two things over and over again: (1) read and (2) write.

(True/False)
4.9/5
(32)

When converting floating-point numbers to integers, Python always truncates the fractional part of the number.

(True/False)
4.8/5
(27)

1. Match each definition with its term. -A combination of operators and operands.

(Multiple Choice)
4.8/5
(30)

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?

(Multiple Choice)
4.7/5
(46)

What is the Python prompt?

(Multiple Choice)
4.7/5
(38)

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?

(Multiple Choice)
4.7/5
(33)

What is the result of the expression 15/2?

(Multiple Choice)
4.7/5
(36)

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?

(Multiple Choice)
4.9/5
(30)

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?

(Multiple Choice)
4.8/5
(33)

Whole numbers in Python are called:

(Multiple Choice)
4.8/5
(45)
Showing 21 - 34 of 34
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)