IT 207 Review Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

1. An aspect of programming language which is represented by numbers, strings, simple operators, etc.

a. syntax b. primitive construct c. semantics d. static semantics


2. An aspect of programming language which means that syntactically valid strings have meaning.
a. syntax b. primitive construct c. semantics d. static semantics
3. An aspect of programming language in which the meaning is associated with a syntactically correct
string of symbols with no static semantic errors.
a. syntax b. primitive construct c. semantics d. static semantics
4. Errors that are common and easily caught
a. static semantic errors b. syntactic errors c. logical errors d. none is correct
5. A sequence of definitions and commands that instructs the interpreter to do something.
a. program b. statements c. command d. code
6. A scalar object that represents integers
a. int b. bool c. float d. NoneType
7. A scalar object that represents real numbers
a. int b. bool c. float d. NoneType
8. A scalar objet that represents Boolean values
a. int b. bool c. float d. NoneType
9. It converts an object of one type to another
a. replace b. cast c. define d. declare
10. Command in python to show output from code to user
a. print () b. System,out.println() c. def() d. none is correct
11. A combination of objects and operators
a. expression b. variable c. parenthesis d. assignment
12. It has the highest precedence among the arithmetic operators
a. ** b. / c.% d. ( )
13. It means equality of expressions or values.
a. = b. == c. equals d. assignment
14. Assigning new value to a variable
a. rebind b. recast c. renew d. reassign
15. A python program has an extension of
a. pt b. pn c. py d. pyt
16. A shortcut key to run python from the editor
a. F4 b. F6 c. F5 d. F8
17. It can hold many items together just like having multiple variables in it.
a. list b. val c. loop d. section
18. A control structure that allows the repetitive execution of a statement or group of
statements.
a. selection b. loop c. multiple branching d. none is correct
19. A command in python that allows user’s response.
a. input() b. enter() c. scanner d. none is correct
20. He developed the python programming language.
a. Guido van Rossum b. Mark Zuckerberg c. Larry Page d. Elon Musk
Part 2
1. Define a LIST of 10 student names
1. Get the name of the first student from the list that you have defined in no. 1
2. Write a selection statement that prints “You may enter” if the user enters 18 for age.
3. Write a selection statement that prints” You may ride the rollercoaster ” if the user enters 6 or over
for age and 5 or over for height.
4. Write lines of code that asks the user about the weather: rainy, sunny, snow. It then chooses one of
the 3 branches and weather condition.
5. Write a line of code to print: YOU’RE A STRONG PERSON.
6. Write lines of code that will print 2 times the line: HIP HIP HOORAY!
7. Write a line of code that will call and pass values to the function: check_guess (guess, answer)
8. Write a code that will compare and convert values of answer and guess to lower case
9. Write a line of code that will name a function a name and parameters.

You might also like