Cis020-1 Introduction to Software Development

Download 46.74 Kb.
Size46.74 Kb.
1   2
CIS020-1-CIS093-1-Week 1-2-Questions
beta digit

  • binary digit

  • binary integrated transistor

    1. Although values represented in base 2 are significantly longer than those represented in base 10, binary representation is used in digital computing because

    1. it’s impossible to design a switch with more than two options

    2. of the resulting simplicity of hardware design

    3. early technology wasn’t advanced enough to utilize binary representation

    1. An operating system

    1. is software that manage the hardware of a computer and provides a user interface

    2. converts binary data to hexadecimal data for the computer to understand

    Fill-in-the-Blank Questions

    1. We are used to representing numbers in a decimal system, that is, in base __ ___.

    1. Any information can be represented by use of only ______ symbols.

    1. 10011 is a binary number. The number that it translates to in the decimal system that we are used to is ____.

    1. A byte usually consists of ____ bits.

    1. The prediction that the number of transistors that would be able to be put on a silicon chip would double roughly every two years is known as _ __.

    Open Response Questions

    1. Convert the following binary numbers to base ten.

    (a) 1010 (b) 10000 (c) 1111 (d) 1111111 (e) 10000001

    1. Show all steps for converting the following base ten values into binary (base 2)

    (a) 11 (b) 25 (c) 47

    Section 1.4 - Computer Software

    True/False Questions

    1. True or False? Charles Babbage is considered the first computer programmer.

    1. True or False? While system software is intrinsic to a computer system, application software serves the particular needs of the user.

    1. True or False? The statement “Hear are the results.” contains a semantic error.

    1. True or False? Programming languages are artificial languages, and therefore do not have a clear set of rules of syntax.

    1. True or False? Most programs are written in machine code because this is the only thing the CPU can process.

    1. True or False? Python is a “high level” programming language?

    1. True or False? Compiled programs generally execute faster than interpreted programs.

    1. True or False? Computers do not understand what a program is meant to do, they only follow given instructions.

    1. True or False? Program debugging is a small part of program development.

    1. True or False? Syntax errors are generally easier to find than logic (semantic) errors.

    1. True or False? The two major programming paradigms in use today are imperative programming and object-oriented programming.

    Multiple Choice Questions

    1. A photo editing program is an example of

    1. system software

    2. application software

    3. security software

    4. none of the above

    1. “Hello there, how are you?” is an example of an English sentence that is

    1. syntactically correct

    2. semantically incorrect

    3. both of the above

    1. “Colorless green ideas sleep furiously” is an example of an English sentence that is

    1. syntactically correct

    2. semantically correct

    3. neither the above

    Fill-in-the-Blank Questions

    1. The Central Processing Unit can only run programs written in ______.

    1. The two major programming paradigms in use today are ____ programming and ______ programming.

    Open Response Questions

    1. For each of the following, indicate whether it contains a syntax error, a semantic (logic) error, or has no syntax or semantic errors.

    (a) n1 = 10
    n2 = 20
    print('The sum of n1 + n2 is', n2)

    (b) n1 = 5

    n2 = 10
    n3 = 20
    result = n1(n2 + n3)
    print('Result =', result)

    (c) firstname = input('Please enter your first name: ')

    lastname = input('Please enter your last name: ')
    print('Hello', firstname, lastname)

    S ection 1.5 - The Process of Computational Problem Solving

    True/False Questions

    1. True or False? A brute force approach to computational problem solving is never tractable.

    1. True or False? Every computational problem has an infinite number of solutions.

    1. True or False? There is only one best solution for any given computational problem.

    1. True or False? The best representation of the data in a given program is the one that is most intuitive and understandable by other programmers.

    1. True or False? Algorithms that work well in general, but not necessarily for every problem instance, are called probabilistic algorithms.

    1. True or False? Any changes made in correcting a program error should be fully understood as to why the changes correct the detected error.

    Multiple Choice Questions

    1. Software testing is a crucial part of software development. Testing is done

    1. incrementally as the program is being developed

    2. when the program is complete

    3. when the program needs to be updated

    4. all of the above

    1. A program is generally designed to solve a problem. For each problem, there may be:

    1. only one solution

    2. only an approximate solution

    3. a best solution

    4. numerous solutions

    5. any of the above

    Open Response Questions

    1. Give the four fundamental steps of computational problem solving

    Section 1.6 - The Python Programming Language

    True/False Question

    1. True or False? Guido van Rossum is the created of the Python programming language.

    1. True or False? IDLE is the integrated development environment (IDE) bundled with the Python programming language.

    1. True or False? The Python Standard Library is a collection of example Python programs.

    1. True or False? The values of the arithmetic expression 2 * (2 ** 3) in Python is 16.

    1. True or False? The following expressions 4(2 + 6) and 4*(2 + 6) are equivalent in Python.

    1. True or False? The input function in Python both displays output on the screen and gets input from the user.

    Multiple Choice Questions

    1. Python is most commonly translated by use of an

    1. interpreter

    2. compiler

    3. executer

    1. Characters within quotes, such as ‘Hello World!’, are called

    1. buffers

    2. textlines

    3. strings

    1. For the following lines of Python code, assuming that the user enters “Charles” when prompted for their name, what would the output be?

    name = input(‘What is your name? ‘)
    print(‘Hello’, name)

    1. Hello, Charles

    2. Hello, Charles

    3. Hello, Charles!

    Fill-in-the-Blank Questions

    1. “A name that is assigned to a value” is a simple description of what fundamental programming concept? ______

    Open Response Questions

    1. Give the value of each of the following in Python.

    (a) 4 * 3 (b) (4 * 5) + 12 (c) (6 + 9) / 10 (d) 2 ** 4

    1. What is displayed by the following Python code?

    (a) n = 20
    print('n = ', n)

    (b) n = 20

    k = n + 10
    print('k = ', n)

    (c) n = 20

    k = 10
    print('n + k = ', n + k)

    1. What is displayed by the following Python code? Assume that the user enters Crystal for each of the following user prompts.

    (a) name = input('What is your name? ')
    print('Hello', name)

    (a) name = input('What is your name? ')

    print('Hello,', name, 'is a nice name')

    Download 46.74 Kb.

    Share with your friends:
  • 1   2

    The database is protected by copyright © 2022
    send message

        Main page