Font size
WorksheetsLatihan ICT Part 2
Total questions: 10
Worksheet time: 6mins
When use Comment Line in python ?
To explain Python code
To make the code more readable
To prevent execution when testing code
None of Them
How To Write Comment on Python ?
Comments starts with a # for one line
Start and End with (triple quotes) for multiline Comments
Comments starts with a // for one line
Comments starts with a ' for one line
How to write one line comment in python programming?
#This is a comment
print("Hello, World!")
print("Hello, World!") #This is a comment
//this is a comment
'this is a comment
This is Sample of ?
Multi Line Comment
Single Line Comment
Number Value
String Value
Symbol ( +, -, , /, %, **, // ) is group of ?
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
Symbol ( =, +=, -=, /=, %=, *= ) is group of ?
Arithmetic operators
Assignment operators
Comparison operators
Logical operators
if we want to compare whether two objects are equal or not, what operator symbol do we use?
==
=
===
====
"Returns True if Both statements are True". Is this statement from?
"and" Operator
"or" Operator
"Not" Operator
"is" Operator
the Simple "if statement" consist of?
if(condition):
indented Statement Block
if(condition):
Indented statement block for when condition is TRUE
else:
Indented statement block for when condition is FALSE
if(Condition1):
Indented statement block for Condition1
elif(Condition2):
Indented statement block for Condition2
else:
Alternate statement block if all condition check above fails
Not Mentioned
Part of Loop in Python....
For Loop
While Loop
Nested Loop
IF Loop
