Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Python_Basics_Questions

The document consists of a series of questions covering fundamental concepts of Python programming, including its nature as a compiled or interpreted language, portability, high-level features, variable declaration, indentation importance, reserved keywords, data types, comments, arithmetic operators, type conversion, and user input. Each section poses specific questions aimed at testing knowledge and understanding of Python's syntax and functionalities. The questions are structured to facilitate learning and reinforce key programming principles in Python.

Uploaded by

rajsinghan388
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Python_Basics_Questions

The document consists of a series of questions covering fundamental concepts of Python programming, including its nature as a compiled or interpreted language, portability, high-level features, variable declaration, indentation importance, reserved keywords, data types, comments, arithmetic operators, type conversion, and user input. Each section poses specific questions aimed at testing knowledge and understanding of Python's syntax and functionalities. The questions are structured to facilitate learning and reinforce key programming principles in Python.

Uploaded by

rajsinghan388
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python Basics - Questions

Compile
1. Is Python a compiled or an interpreted language? Explain.
2. How does Python execute a script differently than C or Java?

Portable

1. What makes Python a portable language?


2. Can a Python program written on Windows run on Linux without modification? Why?

High Level

1. What does it mean for Python to be a high-level programming language?


2. How does Python abstract low-level memory management from the user?

print()

1. How do you print 'Hello, World!' in Python?


2. What happens if you use print() without any arguments?

Variables

1. How do you declare and assign a variable in Python?


2. Can a variable name start with a number? Why or why not?

Indentation

1. Why is indentation important in Python?


2. What will happen if indentation is not used properly in a Python script?

Reserved Keywords

1. What are reserved keywords in Python? Give two examples.


2. Can you use a reserved keyword as a variable name? Why?

Data Types

1. List the main data types in Python.


2. What is the difference between mutable and immutable data types?

Comments in Python

1. How do you write a single-line comment in Python?


2. How do you write a multi-line comment in Python?

Arithmetic Operators

1. What are the basic arithmetic operators in Python?


2. How do you perform exponentiation in Python?

Type Conversion and Type Casting

1. What is the difference between implicit and explicit type conversion?


2. How do you convert a string '10' into an integer in Python?

Input in Python

1. How do you take user input in Python?


2. What data type does the input() function return by default?

You might also like