Font size
WorksheetsPython Basics
Total questions: 10
Worksheet time: 5mins
How to insert comments in Python ?
# this is a comment
// this is a comment
/* this is a comment */
How to create a numeric variable age with a value of 10
age = 10
age = int(10)
age = "10"
What is the correct extension for python files ?
.py
.pyth
.python
In python, "Hello World" is the same as 'Hello World'
True
False
Which of the below operators can be used to compare two numbers
==
><
=
Which of the following is True
Python is an interpreted language
Python is a compiled language
Python is a scripting language
Python is an Object oriented language
How is a block of code defined in Python ?
with indentation
with paranthesis
with curly braces
Which of the following is true about comments
Comments are used by programmers to document the code
# is used to create a comment in python
''' can be used to create a comment in python
/* */ can be used to crate a comment in python
Python ignores comments.
age = '5'
In the code above, age is a
string
integer
floating point
How do you take input from the user ?
input ()
scanf ()
console ()
all of the above
