0% found this document useful (0 votes)
0 views11 pages

Python Practical

The document outlines a series of programming assignments for a Bvoc Software Development course at Ramanujan College, Delhi University, submitted by a student named Gourav Yadav. It includes tasks related to quadratic equations, prime number generation, string manipulation, and character analysis. Each question specifies a programming requirement, emphasizing the need to implement solutions without using functions or imports.

Uploaded by

G A U R A V
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)
0 views11 pages

Python Practical

The document outlines a series of programming assignments for a Bvoc Software Development course at Ramanujan College, Delhi University, submitted by a student named Gourav Yadav. It includes tasks related to quadratic equations, prime number generation, string manipulation, and character analysis. Each question specifies a programming requirement, emphasizing the need to implement solutions without using functions or imports.

Uploaded by

G A U R A V
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

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

You might also like