0% found this document useful (0 votes)
4 views3 pages

F Python Questions

The document outlines a series of programming tasks and exercises primarily focused on string manipulation, data handling, and basic database operations using Python. It includes tasks such as identifying Armstrong numbers, calculating statistical measures, and managing records in text and binary files. Additionally, it mentions SQL queries for managing student records in a database.

Uploaded by

Vani Jain
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)
4 views3 pages

F Python Questions

The document outlines a series of programming tasks and exercises primarily focused on string manipulation, data handling, and basic database operations using Python. It includes tasks such as identifying Armstrong numbers, calculating statistical measures, and managing records in text and binary files. Additionally, it mentions SQL queries for managing student records in a database.

Uploaded by

Vani Jain
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

INDEX

[Link]. Program Teacher’s


signature
Write a code to get a string from a given string where all
occurrences of its rst character have been changed to '*',
except the rst character itself using func on.
Write a code to swap commas and dots in a user de ned
string using func on.
Write a code to nd all duplicate characters in a user
de ned string using func on.
Write a code LeftShift(lst, x) in Python which accepts
numbers in a list (lst) and all the elements of the list should
be shifted to left according to the value of x.
Write a code using func on to iden fy whether a given
number is Armstrong number or not.
Write a program using func on and container func on that
groups anagrams together using dic onaries:
words = ['eat', 'tea', 'tan', 'ate', 'nat', 'bat']
# Output: {'aet': ['eat', 'tea', 'ate'], 'ant': ['tan', 'nat'], 'abt':
['bat']}
Write a code to generate a random numbers between 1
and 6 which simulates just like a dice
Write a code to determine whether the given string is
palindrome or not using func on.
Write a code to determine the mean,median and mode of
all the elements of a list using func ons.
Write a code to read data from a text le [Link], and
display word which have maximum/minimum characters.
Write a code to read data from a text le [Link], and
display each words with number of vowels and consonants.
fi
fi
fi
ti
fi
ti
ti
ti
ti
ti
ti
ti
fi
fi
ti
ti
fi
Write a code to read data from a text le [Link], and
convert all uppercase characters to lowercase and vice
versa.
Write a code which accepts author name as parameter and
count and return number of books by the given author are
stored in the binary le “[Link]”
Write a code to display the record of a par cular product
from [Link] whose code is passed as an argument. The
le contains product code and price.
Write a code considering a binary le ‘[Link]’ having
structure [admnno, Name, Percentage]. Create a func on
that would read all content of le and display the details of
those students whose percentage is above 90. Also display
the number of students scoring above 90% and above 80%
separately.
Write a program to read all content of “[Link]” and
display records of only those books whose author is given
by user. Records stored in students is in format: Book id,
book name, author, edi on, price
Write a program to calculate the percentage of all the
students given in the le ”[Link]”. Records in marks .csv
should be in the following format
Rollno, Name, marks
Write a program to calculate the sum of all the marks given
in the le ”[Link]”. Records in marks .csv should be in
the following format
Admin no,Rollno, Name, marks
Create a separate func on to show the detail of the student
who scored the highest marks , lowest marks, search
speci c admin no.
Write a menu driven code using func ons Add ight(),
Delete ight(), Display ight() to implement the Stack. The
program will store the details of the ights i.e. ight
number, ight name and fare.
fi
fi
fi
fi
fl
fl
fi
fi
ti
fl
ti
fi
fi
fl
ti
fi
ti
fl
fl
ti
Write a code to display the size of a text le in bytes.
Write a program having add and remove func ons to add
new client and delete exis ng client from a list "client
detail" displaying push and pop opera ons on the stack.
Also search a speci c client using his/her [Link] client detail
list should include id, client name and contact no.
Write command to calculate the max, min, average, sum of
marks from student table having columns as rollno, name,
class, marks, city.

Write a code to insert a new record in table student. The


func on should pass values as parameters.(refer table of
Q21)
Write a code to delete a record in the student table
according to the rollno passed as parameter.(refer table of
Q21)
Write a code to read the student marks as parameter and
update the record in student table .(refer table of Q21)
MY SQL QUERIES
ti
fi
ti
ti
fi
ti

You might also like