Professional Documents
Culture Documents
Python
Python
INFORMATION
TECHNOLOGY
ASSIGNMENT 04
PYTHON
PROGRAMMING
LUQMAN
ARSHARD
INDEX NO: NG/DIPICT/52/74
2022
2022
PART 1-PROGRAMMING LOGIC
TASK 02
Begin
Input Num
IF Num 0 < and < 10 then
Word = “unicorn”
Else
IF Num 10 < and < 20 then
Word = “Phoenix”
Else
IF Num 20 < and < 30 then
Word = “Pegasus”
IF Num > 30 then
Word = “Mermaid”
ENDIF
ENDIF
ENDIF
ENDIF
Output Word
End.
TASK 03
START
Num = 0
INPUT Num
Yes OUTPUT
Is Num > 0 ?
“Positive Number”
No
OUTPUT
“Negative Number”
END
TASK 04
TASK 05
START
Num = 0
Count= 0
INPUT Num
Is Num
No
10 < and > 100? Yes
No
Yes Is
END
Count < 10?
OUTPUT Num
Count=Count + 1
PART 2-PYTHON PROGRAMMING
TASK 06
CODE
OUTPUT
TASK 07
CODE
OUTPUT
TASK 08
CODE
OUTPUT
TASK 09
CODE
OUTPUT
TASK 10
CODE
OUTPUT