Python Basics Quiz
In this notebook, I want to observe any trends related to customers.
Keywords
What is Python, What is Python used for?, Python Displaying output
Basic Quiz
Which command is used to install Python on Windows?
python install
pip install python
- Download the installer from python.org and run it
sudo apt-get install python
How do you start writing a Python script?
- Start with
main()
function - Write code directly without a main function
- Include a header file
- Use
int main()
- Start with
Which extension is used for Python files?
.py
.java
.c
.cpp
Which function is used to display output in Python?
output()
echo()
printf()
print()
How do you display the string “Hello, World!” in Python?
echo "Hello, World!"
print("Hello, World!")
printf("Hello, World!")
output("Hello, World!")
Which symbol is used for indentation in Python?
- Curly braces
{}
- Semicolon
;
- Tab or spaces
- Colon `:
- Curly braces
How do you write a comment in Python?
// This is a comment
# This is a comment
/* This is a comment */
<!—This is a comment -->
Which of the following is a multi-line comment in Python?
''' This is a comment '''
# This is a comment
// This is a comment
/* This is a comment */
END