0% found this document useful (0 votes)
42 views2 pages

Unit-1 - All Questions in Python

Uploaded by

vasukommaraju369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views2 pages

Unit-1 - All Questions in Python

Uploaded by

vasukommaraju369
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PYTHON UNIT-1

Part-1:-
Q1) Explain in detail about Python and its applications.
Q2) Explain the working of Python interpreter with a neat diagram.
Q3) Explain the features of Python in detail with examples.
Q3.1) Explain the steps for installing Python.
1 mark Questions
1. Who developed Python and when was it released?
2. Why is Python called an interpreted language?
3. What are the advantages of Python?
4. What is PEP 8?
5. What is the extension of a Python file?
Part-2:-
Q4) Explain Variables in Python with examples.
Q4.1) Explain the Types of Variables in Python with examples.
Q4.2) Explain Identifiers in Python with rules and examples.
Q4.3) Explain Keywords in Python with examples.
Q4.4) Explain Constants in Python with examples.
1 mark Questions
1. How to Create a Variable?
2. Why do we need Variables?
Part-3:-
Q5) Writing and Running the First Program – print() Function
Q5.1) Explain Input and Output operations in Python with examples.
Q6) Explain Comments in Python with examples.
Q7) Explain Indentation and Code Blocks in Python with suitable examples.
Q8) Explain the Data Types in Python with examples.
Q9) Explain Type Conversion in Python with examples.
Q10) Explain all types of operators in Python with examples.
Part-4:-
Control Structures Related Questions
1. Selection Statements (Decision Making)
Short / 2M Questions
1. What is the syntax of the if statement in Python? Give an example.
2. Differentiate between if-else and if-elif-else.
3. Write a Python program to find the largest of two numbers using an if statement.
4. Explain nested if with an example.
Long / 10M Questions
1. Explain if, if-else, and if-elif-else statements with suitable examples in Python.
2. Write a Python program to check whether a number is positive, negative, or zero using
if-elif-else.
PYTHON UNIT-1

3. With an example, explain how nested if statements are used in Python.


4. Write a program that accepts marks of a student and displays the grade using if-elif-else.
Programming Practice
1. Program to check if a given year is a leap year using if-else.
2. Program to find the largest of three numbers using nested if.
3. Program to check if a character is a vowel or consonant using if-elif.

Part-5:-

2. Loops (Iteration Statements)


Short / 2M Questions
1. Write the syntax of the while loop in Python.
2. Differentiate between for loop in Python and C.
3. What is the use of the break statement in loops?
4. What is the use of the continue statement in loops?
5. Explain pass statement with an example.
Long / 10M Questions
1. Explain while loop with syntax, flowchart, and example.
2. Explain for loop with range() function in Python with examples.
3. Explain the working of break and continue with suitable Python programs.
4. Explain the role of the else clause with loops in Python. Give a program.
5. Write a program to print all prime numbers in a given range using loops.
6. Write a program to calculate the factorial of a number using both for and while loops.
Programming Practice
1. Program to display multiplication table using for loop.
2. Program to sum the digits of a number using while loop.
3. Program to print Fibonacci series using a loop.
4. Program to search an element in a list using for loop and break.
5. Program to check if a number is prime using for loop and else.

You might also like