0% found this document useful (0 votes)
34 views3 pages

It Final Assignment

Uploaded by

gutakoo5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views3 pages

It Final Assignment

Uploaded by

gutakoo5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

ICT 04/06/2024

1.
GROUP ASSIGNMENT

Grad

12
Name:- Rebira Alemayehu

ID No :- 34

Submitted to : Tr, Adisu

Part I: Write True if the statement is correct and False if it is incorrect.


1. There are three program logics: sequential, conditional (branching), and
iterative (looping).
 TRUE
2. Indentation in python is used for code readability only.
 FALSE– indentation is very important in python; unlike other programming language, Python uses
indentation to indicate a block of code.
3. In python, looping can be implemented using for and while statement.
 TRUE
4. The order in which the program code execution is determined is referred as flow control.
 TRUE
5. In python, we can apply different indentations in a program.
 FALSE – in a python program you should apply consistent indentation, otherwise it will result in error.
6. Condition (expression) in the conditional statement must evaluate to either true or false.
 TRUE
7. In while statement, the loop continues as long as the condition is satisfied.
 TRUE
8. A comment is an executable statement.
 FALSE – comment is line of statement ignored by python interpreter.
9. Interpreter can either execute the source code directly or translate the source code in a first step into a more
efficient representation and execute this code.
 TRUE
10. A bug is a syntax error in your program.
 FALSE – bug is any undesirable situation in our program. It could be syntax or semantics error.

Part II: Match the items given under column B with associated items in column A

ANSWER A B
G 1. Program flow control A. if, if…else, if…elif..else
J 2. Bytecode(.pyc file) B. interactive interpreter
E 3. Breakpoint C. a>b, a==b
H 4. Indentation D. writes, compiles, tests and runs a program
A 5. Branching statement E. line interpreter pauses while
running
F 6. Nested loop F. Loop inside another loop
C 7. Condition(expression) G. Order of code execution
D 8. IDE H. Indicates block of code
B 9. Read-Eval-Print Loop (REPL) I. Any line preceded by the hash(#)
I 10. Comment J. Python Virtual

Part III: Choose the correct answer from the given alternatives.
D 1. All are a program flow controls except____.
A. sequential statement B. branching statement
C. looping D. comment
C 2. The statement range(9) generates a sequence of numbers from_____.
A. 0 to 9 B. 0 to 8
C. 1 to 9 D. 1 to 8
A 3. One of the following cannot be the condition(expression) of ‘if statement’:
A. a = b B. a !=b
C. a >=b D. a == b
B 4. Which of the following indentation is not valid in python?
A. if 5:print(‘five’) B. if a>b:print(‘greater than’)
C. if 4 > 5: print(‘false’) D. if a:print(‘yes’)
A 5. Compiled source code is stored in_____.
A. .pyc file B. .py file
C. Pvm file D. Compiler

You might also like