1. Introduction to Python

Lecture 1.

Introduction to Computers, Programming, and Python.

78 minutes video lecture

Slides

Video Lectures

Review Questions

1: A bit is a sequence of 8 bytes. (T/F)?

False

2: We can store data permanently in storage devices. (T/F)?

True

3: Assembly language is a low level programming language. (T/F)?

True

4: Only numeric data is stored as binary. (T/F)?

False

5: We can store data permanently in RAM. (T/F)?

False

6: A high level language is closer to hardware in terms of direct interaction than a low level language? (T/F)?

False

7: Which is an example of a code in machine language?

  • area = 5 * 5 * 3.1415
  • 1101101010011010
  • Both of the above
  • None of the above
Click here to see the answer.

1101101010011010

8: Find the error in the following program. Is that a syntax error or a logic error?

# This program prints Hello World!
print("Hello World!"
Click here to see the answer.

Missing paranthesis at the end of the print statement. It’s a syntax error, it will be detected by the compiler. Correct version is below.

# This program prints Hello World!
print("Hello World!")

9: Find the error in the following program. Is that a syntax error or a logic error?

# This program prints Hello World!
pirnt("Hello World!")
Click here to see the answer.

Misspelling of print statement. It’s a syntax error, it will be detected by the compiler. Correct version is below.

# This program prints Hello World!
print("Hello World!")

10: Find the error in the following program. Is that a syntax error or a logic error?

# This program prints Hello World!
print("Hello Wrld!")
Click here to see the answer.

Misspelling of World. It’s a logic error, it will not be detected by the compiler. Correct version is below.

# This program prints Hello World!
print("Hello World!")

Feedback

Next