Assignment 1
Date:- 17.10.2020
1. Write a program to find the area of Circle.
2. Write a program to calculate the area of Rectangle.
3. Write a program to calculate the area of Square.
4. Write a Program to find the simple interest (user should enter Principal, Rate and time during run time)
5. Write a program to find the average of marks of 5 subjects ( user should enter the marks in 5 subjects, take
the subjects of any marks
the subjects of any marks
Assignment 2
(Autumn Break Home Work for CS/IP Students)
Date:-21.10.2020
1. Define Language processor and its type .
2. What do you mean by operators. Explain different types of operators with suitable example
3. Define Hardware and Software. What are the different types of Software, Give the example of
each category
each category
4. Write down the main features of All generations of Computer
5. Explain the following - CD,DVD,Blu Ray Disk,RAM,ROM,
6. Explain the memory unit. Write down all units like bit,byte,kolobyte ..... with their capacity.
7. Write down the names of different generation computers with the name of their Developer or
inventor ( Ex. Analytical Engine - Inventor Name)
inventor ( Ex. Analytical Engine - Inventor Name)
10. Define Multimedia, Name any two multimedia software.
11. Write a program to find the largest between 2 values
12 Write a program to find Smallest among 5 values.
13. Write a Program to print the day Name for given Value ( Ex. if you input 1, your output should ne
Sunday ....
Sunday ....
14. Write a Program to print the Month Name for given Value ( Ex. if you input 1, your output
should January ....
should January ....
15. Explain Token in python with its type.
ASSIGNMENT-17.12.20
1. Write a program to generate divisor of a number (Ex. suppose number is 10, output should be
1,2,5)
1,2,5)
2. Input three number angles and determine if they form a triangle or not.
ASSIGNMENT-18.12.20
1. Write a program to input two integers x and n and compute x to the power n using loop.
2. Write Python program to print following pattern.
ASSIGNMENT-19.12.20
1. Write a program to print the following pattern
1
1 3
1 3 5
1 3 5 7
2. Write a program to check if the year entered by the user is a leap year or not
ASSIGNMENT-20.12.20
1. Write a program to find the sum of square of the first 100 natural number.
2. Write a program to print a pattern like
4 3 21
4 3 2
4 3
4
ASSIGNMENT-21.12.20
1. Write a program to print the Fibonacci series up to n terms, the value of n will be entered by
the user during run time
the user during run time
2. How many time while loop (given below) will be executed, explain why ?
ch='y'
ch='y'
while ch=='y':
print("K. V. No.2 JLA")
print("K. V. No.2 JLA")
ASSIGNMENT-22.12.20
- What will be the output produced by the following code segment
a.) 17%5 b.)17%5.0 c.)(17%5)==(17%5) d.) (17%5) is (17%5) e.)(87//int(5.0)==(87//5.0) - Write a program to calculate compound interest.
ASSIGNMENT-23.12.20
- Choose valid identifiers/variables from
a.) true b.)True c.) 1a1 d.)a11 e.)_a11 f.)first name g.) first_name h.) _firstname - Explain type casting . what are different types of type casting explain each with suitable examples
- what will be the data type of -
a.) s=____=17 b.) t=___________+'pie' c.) d=int(a/b)+c
ASSIGNMENT-24.12.20
- convert following binary number into decimal number
1110101.11 , 11011, 11.11, 101.101 - convert the following into binary number.
23.23, 12.12, 454.10 - Write a program to print the sum of multiple of 7 between 1 to 100, using while and for loop both
- find out the error in the given code
if a=b:
print("a is bigger")
else
print("b is bigger"
ASSIGNMENT-25.12.20
1. what will following code print -
str1='''Hell
o'''
str2='''Hell\
o'''
print(len(str1)>len(str2))
2. What do you mean by implicit and explicit type conversion?
3. What will be the output of - print(type(6-3)
3. What will be the output of - print(type(6-3)
4. Write a program to calculate net salary of an employ after inputting basic salary,hra,da
and tax (net=basic+hra+da-tax)
and tax (net=basic+hra+da-tax)
ASSIGNMENT (26.12.20)
1. find output
(a)
s1='b'
i=0
j=0
k=1
for i in range(0,4):
s2=s1
for j in range(0,k+1):
s2=chr(ord(s2)+1)
s1=chr(ord(s1)+2)
k=k+2
print(s2)
(b)
a=3
n1=336
n2=27
while True:
a=a*3
if a>n1:
a=a-5
break
while True:
a=a/3
a=int(a)
if a<n2:
a=a-5
break
print(a)
(c)
n=1491
e=54
u=6
rdx=0
bly=0
ifz=0
ifw=0
while u<n:
u=u*4
if not u%3:
u=u+20
ifz=ifz+1
rdx=rdx+1
print(u)
while u>e:
u=u/5
if not u%3:
u=u-5
ifw=ifw+1
bly=bly+1
print(u)
print(rdx+bly+ifz+ifw
ASSIGNMENT (27.12.20)
1. Which of the following identifier names are invalid and why .
Serial_no, 1st_Room, Hundred$, Total Marks, Total_marks, _Percentage, True
2. Write a program to assign the grades to students, input-marks in 5 Subjects and find the
total marks and give the grade as per the given criteria - if marks >250 and <300 - "C"
Grade, if marks >=300 and <400 - "B" Grade, if marks >=400 and <500 - "A" Grade,
Serial_no, 1st_Room, Hundred$, Total Marks, Total_marks, _Percentage, True
2. Write a program to assign the grades to students, input-marks in 5 Subjects and find the
total marks and give the grade as per the given criteria - if marks >250 and <300 - "C"
Grade, if marks >=300 and <400 - "B" Grade, if marks >=400 and <500 - "A" Grade,
ASSIGNMENT (28.12.20)
1. What are the different rules to declare variable.
2. Write a program to find the sum of 1+(1+2)+(1+2+3)+(1+2+3+4)
ASSIGNMENT (29.12.20)
2. Find the error and write the correct code.-
if v<5:
if v<5:
for i in range(v):
print "ABC"
else:
print "XYZ"
3. x=True y=False
Z=false
if x,y,z:
print "yes"
else:
print "No"
ASSIGNMENT 30.12.20)
1. Explain Different operators with suitable example
2. Write a Program to print the series using while loop
100,95,90,85,80 .........................0
100,95,90,85,80 .........................0
ASSIGNMENT (3.1.21)
1. find the output of code given below
sum=0
sum=0
for i in range (1,50,2):
if i%2==0:
sum=sum+i
if i%2==0:
sum=sum+i
else:
sum1=sum1+i
print(sum,sum1)
2. find the error in the given code
for i in range(10,1,1):
if i%2=0::
print(i, "is even')
if i%2=0::
print(i, "is even')
else:
print(i, "is odd")
print(i, "is odd")
ASSIGNMENT (4.1.21)
1. Define the following terms
a. Data Types, b. Compiler, c. interpreter, d. variable, e. identifier, f. logical operator,
a. Data Types, b. Compiler, c. interpreter, d. variable, e. identifier, f. logical operator,
g. Boolean variable, h. while loop, i. for loop j. if -elif-else conditional statement
statement, k. literals
statement, k. literals
ASSIGNMENT (5.1.21)
1. Write a program to print the series - 1, 9, 25,49,81,121,169
2. Write a Program to print the sum of those numbers which are divisible by 9 (between 1 to 100)
ASSIGNMENT (6.1.21)
1. Write any program using - Arithmetical , Logical, Relational, operators
2. Explain Break and continue statement with suitable examples
ASSIGNMENT (7.1.21)
1. What are the different number systems in computer? Explain each with one suitable example
2. Explain Explicit Type casting with example.
2. Explain Explicit Type casting with example.
ASSIGNMENT (10.1.21)
1. What is the output of - (a). 3*1**3 (b). 3**1**3 (c). 3*3**1 (d). 21//4+6/3
(e). print(4.00/(2.0=2.0)
2. Explain - Syntax Error, Name Error, Value Error, Type Error
ASSIGNMENT (11.1.21)
1. What is the name of these operator -
(a) // (b) % (c) << (d) >> (e)
(a) // (b) % (c) << (d) >> (e)
2. Which line of code produces an error
(a) "one" + "two" (b) 1+2 (c) "one"+"2" (d) '1'+2
(a) "one" + "two" (b) 1+2 (c) "one"+"2" (d) '1'+2
ASSIGNMENT (12.1.21)
1. What is the output of this code-
(a) print(int("3"+"4")) (b) print(3**3.0)
(a) print(int("3"+"4")) (b) print(3**3.0)
2. Write a program to find the x to power y, using for loop , user should input x and y during run time.
ASSIGNMENT (12.1.21)
1. Write a program to input a list during run time and write menu driven program to insert, pop/remove, search an element from the the list.
2. write a program to search an element from the list print the location at which the element is present
2 Comments
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete