0% found this document useful (0 votes)
187 views1 page

Python Prog Assignment-1

This document contains the details of Assignment 1 for the Python Programming course KNC-402. It includes 12 questions covering topics like why Python is a dynamic and strongly typed language, the difference between pass statements and comments, Python arrays vs lists, the Python programming cycle, Python IDEs, for loops with ranges, operator precedence and associativity, type conversion, memory management and PEP 8 in Python, Python interpretation and tools for debugging, Python decorators, errors in variable assignment, and errors in program manipulation of list elements.

Uploaded by

Paras Dwivedi
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)
187 views1 page

Python Prog Assignment-1

This document contains the details of Assignment 1 for the Python Programming course KNC-402. It includes 12 questions covering topics like why Python is a dynamic and strongly typed language, the difference between pass statements and comments, Python arrays vs lists, the Python programming cycle, Python IDEs, for loops with ranges, operator precedence and associativity, type conversion, memory management and PEP 8 in Python, Python interpretation and tools for debugging, Python decorators, errors in variable assignment, and errors in program manipulation of list elements.

Uploaded by

Paras Dwivedi
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/ 1

Python Programming (KNC-402)

Assignment 1

Faculty Name: Dr Rajiv Kumar


Date of Submission: 12-May - 2023
1 Discuss why Python is called as dynamic and strongly typed language? (KNC-402.1, K2)
2 How pass statement is different from a comment? (KNC-402.1, K2)
3 What is the difference between Python Arrays and Lists (KNC-402.1, K1)
4 Explain the Programming Cycle for Python in detail (KNC-402.1, K2)
5 What do you mean by Python IDE? Explain in detail. (KNC-402.1, K2)
6 Write a for loop that prints numbers from 0 to 57, using range function. (KNC-402.1, K2)
7 What do you mean by operator precedence and associativity. (KNC-402.1, K2)

8 Write short notes on (KNC-402.1, K2)


i. The programming cycle for python
ii. Type conversion in python
9 How memory is managed in Python ? Explain PEP 8. Write a python program to print
even length words in a string. (KNC-402.1, K2)
10 How python is interpreted? What are the tools that help to find bugs or perform static
analysis? What are python decorators? (KNC-402.1, K2)
11 Which of the following statements produce an error in Python?
x, y, z = 1,2,3 # s1
a, b = 4,5,6 # s2
u = 7,8,9 # s3
(List all the statements that have error.) (KNC-402.1, K2)

12 Consider the program:


x = ['12', 'hello', 456]
x[0] *= 3
x[1][1] = 'bye'
Explain why this program generates an error. (KNC-402.1, K2)

*********************

You might also like