1. Introduction to Computers & Python - 28 Questions


1. Introduction to Computers & Python

1. Introduction to Computers & Python

28 Questions
Created by Y. Daniel Liang - http://www.cs.armstrong.edu/liang/index.html
Free
Are you completely new to programming? If not then we presume you will be looking for information about why and how to get started with Python. Fortunately an experienced programmer in any programming language (whatever it may be) can pick up Python very quickly. It's also easy for beginners to use and learn, so jump in!
  1. ________ is the physical aspect of the computer that can be seen.



    Hardware
    Software
    Operating system
    Application program

    View Answer | Discuss in forum
  2. __________ is the brain of a computer.



    Hardware
    CPU
    Memory
    Disk

    View Answer | Discuss in forum
  3. The speed of the CPU may be measured in __________.



    megabytes
    gigabytes
    megahertz
    kilogram

    View Answer | Discuss in forum
  4. Why do computers use zeros and ones?



    because combinations of zeros and ones can represent any numbers and characters.
    because digital devices have two stable states and it is natural to use one state for 0 and the other for 1.
    because binary numbers are simplest.
    because binary numbers are the bases upon which all other number systems are built.

    View Answer | Discuss in forum
  5. One byte has ________ bits.



    4
    8
    12
    16

    View Answer | Discuss in forum
  6. One gigabyte is approximately ________ bytes.



    1 million
    10 million
    1 billion
    1 trillion

    View Answer | Discuss in forum
  7. A computer's _______ is volatile; that is, any information stored in it is lost when the system?s power is turned off.



    floppy disk
    hard disk
    CD-ROM
    memory

    View Answer | Discuss in forum
  8. Which of the following are storage devices?



    floppy disk
    hard disk
    flash stick
    All of the mentioned

    View Answer | Discuss in forum
  9. ____________ is a device to connect a computer to a local area network (LAN).



    Regular modem
    NIC
    Cable modem
    DSL

    View Answer | Discuss in forum
  10. ____________ are instructions to the computer.



    Hardware
    Software
    CD-ROM
    memory

    View Answer | Discuss in forum
  11. Computer can execute the code in ____________.



    machine language
    assembly language
    high-level language
    none of the above

    View Answer | Discuss in forum
  12. ___________ translates high-level language program into machine language program.



    An assembler
    A compiler
    cpu
    The operating system

    View Answer | Discuss in forum
  13. ____________ is an operating system.



    Java
    C++
    Windows XP
    Python

    View Answer | Discuss in forum
  14. _____________ is a program that runs on a computer to manage and control a computer's activities.



    Operating system
    Python
    Modem
    Compiler

    View Answer | Discuss in forum
  15. Python was created by ____________.



    James Gosling
    Bill Gates
    Steve Jobs
    Guido van Rossum

    View Answer | Discuss in forum
  16. ________ is an object-oriented programming language.



    Java
    C++
    Python
    All of the mentioned

    View Answer | Discuss in forum
  17. ________ is interpreted.



    Python
    C++
    C
    Pascal

    View Answer | Discuss in forum
  18. To start Python from the command prompt, use the command ________.



    execute python
    run python
    python
    go python

    View Answer | Discuss in forum
  19. Which of the following code is correct?

     A.
     print("Programming is fun)
     print("Python is fun)


     B.
     print("Programming is fun")
     print("Python is fun")

     C.
     print("Programming is fun)
     print("Python is fun")

     D.
     print("Programming is fun)
     print("Python is fun")



    A
    B
    C
    D

    View Answer | Discuss in forum
  20. A Python line comment begins with ________.



    //
    /*
    #
    $$

    View Answer | Discuss in forum
  21. A Python paragraph comment uses the style ________.



    // comments //
    /* comments */
    ''' comments '''
    /# comments #/

    View Answer | Discuss in forum
  22. A ___________ error does not cause the program to abort, but produces incorrect results.



    syntax
    runtime
    logic
    All of the mentioned

    View Answer | Discuss in forum
  23. In Python, a syntax error is detected by the ________ at _________.



    compiler/at compile time
    interpreter/at runtime
    compiler/at runtime
    interpreter/at compile time

    View Answer | Discuss in forum
  24. To show the current location and direction of the turtle object, use ___________.



    turtle.show()
    turtle.showLocation()
    turtle.showDirection()
    turtle.showturtle()

    View Answer | Discuss in forum
  25. To move the turtle to a point at (4, 5), use ___________.



    turtle.move(4, 5)
    turtle.moveTo(4, 5)
    turtle.moveto(4, 5)
    turtle.goto(4, 5)

    View Answer | Discuss in forum
  26. To draw a circle with radius 50, use ___________.



    turtle.circle(50)
    turtle.circle(100)
    turtle.drawcircle(50)
    turtle.drawCircle(50)

    View Answer | Discuss in forum
  27. To lift the pen, use ___________.



    turtle.penUp()
    turtle.penup()
    turtle.lift()
    turtle.up()

    View Answer | Discuss in forum
  28. To put the pen down, use ___________.



    turtle.penDown()
    turtle.pendown()
    turtle.putDown()
    turtle.down()

    View Answer | Discuss in forum