100% found this document useful (1 vote)
4K views2 pages

11computer Science-Python Fundamentals-Assignment

This document contains 15 questions about Python fundamentals including identifiers, keywords, literals, data types, expressions, statements, operators, functions, and basic programming concepts. Students are asked to define terms, identify examples, predict output, and write simple Python code to calculate areas, percentages, and demonstrate variable assignments.

Uploaded by

vikas_2
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
100% found this document useful (1 vote)
4K views2 pages

11computer Science-Python Fundamentals-Assignment

This document contains 15 questions about Python fundamentals including identifiers, keywords, literals, data types, expressions, statements, operators, functions, and basic programming concepts. Students are asked to define terms, identify examples, predict output, and write simple Python code to calculate areas, percentages, and demonstrate variable assignments.

Uploaded by

vikas_2
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

CLASS-XI

COMPUTER SCIENCE

PYTHON FUNDAMENTALS

ASSIGNMENT

Q1. What is the difference between identifier and keyword ?

[Link] are literals in Python ? How many types of literals are allowed in Python?

[Link] Tokens. Name the different types of Tokens of Python.

[Link] many ways are there in Python to represent an integer literal ?

[Link] the type of following literals :

12.45 2345 True ‘True’ “True”

0X34 034 ‘‘‘False’’’ 34561 None

[Link] is the difference between an expression and a statement in Python?

[Link] the following real constants in exponent form :

17.251 151.02 0.00031

0.452

[Link] the output of following:

x,y = 7,2

x,y,x=x+1,y+3, x+10

print(x,y)

[Link] a Python program to calculate area of a square.

[Link] a Python program to enter marks in five subjects and calculate


percentage.

[Link] the different operators in Python.


[Link] between int( ) and float( ) function of Python.

[Link] of the following identifier names are invalid and why?

i) Serial_no. v) Total_Marks

ii) 1st_Room vi) total-Marks

iii) Hundred$ vii) _Percentage

iv) Total Marks viii) True

Q14. Write the corresponding Python assignment statements:

a) Assign 10 to variable length and 20 to variable breadth.

b) Assign the sum of values of variables length and breadth to a variable sum.

c)Assign 20 to variables x, y and z in a single statement.

Q15. Write the output of the following code:

a) num1 = 4

num2 = num1 + 1

print(num1,num2)

num1 = 2

print (num1, num2)

b) x,y = 7, 2

x,y,x = x+1, y+3, x+10

print(x,y)

c) x,y = 2,6

x,y = y, x+2

print(x,y)

You might also like