BINARY
Logic gates
Programming Terms
Algorithms
Python Codes
100

What is Binary in computer?

its like the language use by the computer that has only 2 characters: 0 and 1.

100

Name All the 3 basic Logic gates.

AND

OR

NOT

100

Define Programming.

It is the creation of computer program.

100

List the 4 Problem Solving Process:

Identify target output

Decompose in Plain English

Write Pseudo-Code

Draw flowchart.

100

Name the programming language we use in this class.

PYTHON

200

Convert 65 to Binary.

01000001

200

Write the expression for the NOT logic gate with input A.

A'

200

Define Programmer.

Someone who writes and creates computer program.

200

Write a pseudo-code for this problem:

Volume = 4/3 Pi r3

Comment: Calculate Volume of Sphere

Start

Pi = 3.14

Input radius

Calculate Volume = 4/3 * Pi * radius * radius * radius

Output Volume

End.

200

What the is command use in Python for output.

print

300

Convert 10001 to Decimal (ASCII code).

17

300

Fill in the Truth table for this Logic gate expression: A' + B

(Draw your own truth table, then show to the teacher)

300

Define algorithm.

it is a sequence of steps to solve a problem.

300

Draw the flowchart for this problem:

Volume = 4/3 Pi r3

(Draw your own flowchart and show to teacher)

300
Debug this Python Code:


village = input("Where are you from?")

village = str(input("Where are you from?"))

400

Complete this binary operation:

1000 + 1001

10001

400

Draw the Logic gate for this expression:

(A' + B') + (C'.D)

(Draw your own Logic gate and show to the teacher)
400

Define Syntax.

It is a set of rules in the programming language.

400

Decompose this problem in plain English.

Volume = 4/3 Pi r3

Set value for Pi to 3.14

Input radius

Calculate the Volume by divide 4 with 3 then multiply with Pi and multiply with the radius 3 times.

Output the Volume.

400

Write the Python code for this line from a Pseudo-Code.


Output Name

print ("Hello {0}" .format(Name))

500

Complete this Binary Operation:

101 + 11 - 1

101 + 11 = 1000

1000 - 1 = 111


Answer is 111

500

Define Debugging.

testing and looking for errors in programming and fixing those errors.

500

Write the Python code for this problem:

Solve  Y = M / 2 + 2n

M = int(input("Enter value for M"))

n = int(input("Enter value for n"))

Y = M / 2 + 2*n

print(" Y = {0}" .format (Y))