Basics
title: Python Basics Quiz keywords: [What is Python, What is Python used for?, Python Displaying output] description: In this notebook, I want to observe any trends related to customers. author: Juma Shafara date: "2024-09-03"

Basic Quiz
-
Which command is used to install Python on Windows? A)
python installB)pip install pythonC) Download the installer from python.org and run it D)sudo apt-get install python -
How do you start writing a Python script?
A) Start with main() function B) Write code directly without a main function C) Include a header file D) Use int main()
-
Which extension is used for Python files? A)
.pyB).javaC).cD).cpp -
Which function is used to display output in Python?
A) output() B) echo() C) printf() D) print()
- How do you display the string "Hello, World!" in Python?
A) echo "Hello, World!" B) print("Hello, World!") C) printf("Hello, World!") D) output("Hello, World!")
-
Which symbol is used for indentation in Python? A) Curly braces
{}B) Semicolon;C) Tab or spaces D) Colon `: -
How do you write a comment in Python?
A) // This is a comment B) # This is a comment C) /* This is a comment */ D)
- Which of the following is a multi-line comment in Python? A)
''' This is a comment '''B)# This is a commentC)// This is a commentD)/* This is a comment */