RAMANUJAN COLLEGE
DELHI UNIVERSITY
NAME: GOURAV YADAV
COURSE : Bvoc SOFTWARE
DEVELOPMENT
ROLLNO: 24107023
SUBMITTED TO: Dr NEHA YADAV
Q1: Find the roots of quadratic equation without functions
and import function
Q2: WAP to accept a number 'n' to compute the following
#2A: Check if 'n' is prime
#2B : WAP a to generate all prime no till n
#2C : WAP To generate first n prime no
#2D : WAP to calculate the sum of first n natural no
Q3 : WAP to create a pyramid of the character * and a reverse
pyramid
Q4: WAP that accepts a character and performs the following:
#4A : WAP to print wheather the character is a letter or numeric or special
character
#4B : if the character is a letter , print whether the letter is uppercase or
lowercase
#4C : if the character is a numeric digit , print its name in text
Q5 : WAP to perform the following operations on a string:
#5A : Find the frequency of a character in a string
#5B : Replace a character by another character in a string.
# 5C : Remove the first occurence of a character from a string
#5D : Remove all the occurrences of a character from a string.
Q6 : WAP to swap the first n characters of two strings.
Q7: Write a function that accepts two strings and returns the
indices of all the occurrences of the second string in the first string
as a list . If the second string is not present in the first string then it
should return -1
Q8 : WAP to create a list of the cubes of only the even integers
appearing in the input list (may have elements of other types
also)using for loop and list comprehension