• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/60

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

60 Cards in this Set

  • Front
  • Back
  • 3rd side (hint)

Computer Science is?

The study of what can be computed.

Which of the following is not a legal identifier?

2Spam

2 what?

The number of distinct patterns the can be represented with 8 bits is?

256bits

Over 200

A program that translates high level source code into machine code is called a?

Complier

Modern digital computers represent numbers:

All of the above:


Using a sequence of bits


Using a binary representation


Using only zeroes and ones

The python numeric type that can represent positive and negative whole numbers is?

Int

Float or int??

The goal of the design phase of the software development process is?

To create an algorithm that solves the problems.

Programs no longer require modification after they are written and debugged?

False

Python identifiers must start with a letter or underscore?

True

Suppose that the variable x holds a floating point number. Which expression gives value of x as int?



int(x)

Which of the following is not part of the definition of a computer?

It is a electronic

And I quote: "Can you fix this?"

The statement "All computers have the same power" means?

Any computer can carry out the same task as any other computer

The int data type is identical to the mathematical concept of integer?

False

What would Python print as a result of this interaction? print(2+3)

5

what is the result of evaluating 7//2?

3

// - Makes the answer a integer

Fragments of code that produce new data values are called?

Expressions

Identifiers in Python may not contain?

Spaces

When a Python int gets "too large" it?

Requires more memory to store

Better download some more ram

The process of describing exactly what a computer program will do to solve a problem is called?

Specification

The best way to write a program is to immediately write down some code and then debug it until it works?

False

What is the result of evaluating 3 + 4.0?

7.0

Consider the following program:


def main():


num = eval(input("Enter a number:"))


for i in range(5):


num = num//2


print(num)


main()

32

Which of the following is not an example of a function from the Python math library?

abs(x)

Since floating point numbers are extremely accurate, they should generally be used instead of ints?

False

Suppose that the variable x has the value 5 and y has the value 10. After executing this statement: x,y=y,x


What will the values of x and y be, respectively?

10 and 5

Consider the following function:


def greet(person):


print("Hello", person)


In this code, person, is an example of a(n)?



Parameter

One disadvantage of using binary floating point representations is that?

They are usually only approximations

The fragment of code eval(input("Enter a number:")) is best described as:

An expression that returns the result of evaluating what the user types

A comment in Python is indicated by a?

Pound(#)

OMG HASHTAG THAT

What Python statement allows the math library to be used in a program

Import math

Suppose a program executes the following statement.


Value = eval(input("Enter a number")


In response to the prompt, the user types 5 + 5. What is the result?

The value will contain 10

Which of the following is not a step in the software development process?

Fee setting

The most appropriate data type for storing the value of pi is?

Float

What does it mean for a mathematical model to be "chaotic"?

Small changes in the initial conditions lead to drastic changes in the results.

"It was the straw that broke the camels back"

What is the first number printed by the following program, assuming that the user enters 0.24 as the input?


def main():


x = eval(input("Enter a number between 0 and 1:"))


for i in range(10):


x = 3.9 * x * (1-x)


print(X)

0.71136

The Python numeric type for representing numbers containing fractional values?

Float

What do boats do?

Suppose that the variable x currently has the value 20. What statement would cause the value of x to become 25?

x = x + 5

What is the result of evaluating list(range(1,7,2))?

None of the above

Magnetic or optical media are generally used for?

Secondary memory

Which of the following is not a part of the IPO pattern?

Program

Fragments of code that produce new data values are called?

Expressions

Python identifiers must start with a letter or underscore?

True

What is the effect of the following Python statement?


for i range(10):

It causes the program to do something 10 times

Which of the following is not used in expressions?

Statements

Suppose that the variable x has the value 5 and y has the value 10. After executing these statements: x = y y=x


What will the values of x and y be, respectively?

10 and 10

Operations like addition and subtraction are defined in the math library?

False

The number of distinct values that can be represented using 5 bits is?

32

What is the correct formula for converting Celsius to Fahrenheit?

F = (9/5)C+32

The template, for in range():, describes?

Counted Loop

What is the result of evaluating 7%2?

1

What is the output from the following program, assuming that the user enters the input value 5?


def main():


n = eval(input("Enter a number:"))


ans = 0


for x in range(1,n):


ans = ans + x


print(ans)


main()

None of the above

The goal of the specification phase of the software development process is?

To determine what the program should do

The Python reserved word for performing output to the screen is?

Print

Which of the following is not one of the functional building blocks of a computer system?

Monitor

Python does not allow the input of multiple values with a single statement?

False

Suppose we interactively define a new function as follows:


def hello():


print("Hello")


print("Computer are Fun")


What would you type to invoke (run) this function?

hello()

What is the output from the following code fragment:


fact = 1


for factor in range(5):


fact = fact * factor


print(fact)



0

Which of the following is the most accurate model of assignment in Python?

Sticky-note

It's sticky

Python is an example of a?

High-level programming language

A step-by-step set of instructions for accomplishing some task is called a?

Algorithm