0% found this document useful (0 votes)
2 views1 page

Practicalfile XI 24

The document outlines various Python programming tasks, including functions to calculate the sum of digits, check for palindromes, filter strings, manage player scores, manipulate strings, and implement a grading system. It also describes a menu-driven program for string operations and tasks related to lists, such as rearranging elements and filtering based on starting letters. Each task includes the requirement to write complete Python programs to demonstrate the functionality.

Uploaded by

jainlavya12
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)
2 views1 page

Practicalfile XI 24

The document outlines various Python programming tasks, including functions to calculate the sum of digits, check for palindromes, filter strings, manage player scores, manipulate strings, and implement a grading system. It also describes a menu-driven program for string operations and tasks related to lists, such as rearranging elements and filtering based on starting letters. Each task includes the requirement to write complete Python programs to demonstrate the functionality.

Uploaded by

jainlavya12
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
You are on page 1/ 1

Write a program to calculate the sum of the digits of a number using functions.

Write a function that takes a list of numbers as an argument and return the sum of
all numbers which are divisible by 5. Also write a complete Python program to call
this function.
Write a function that takes a string as an argument and return Palindrome if the
string is a palindrome otherwise return Not A Palindrome. Also write a complete
Python program to call this function.
Write a Python function that takes a list of strings as an argument and displays the
strings which starts with “S” or “s”. Also write a program to invoke this function.
Write Python script to create a dictionary with players name and their score. Write a
function that accepts this dictionary as an argument and displays the name of the
player with the highest score.
Write a Python program to remove the nth index character from a nonempty string.
If input string is “python” and index is 3, Expected output :”pyton”

Write a menu driven program to accept a string and do the following operation as
per
the choice of the user
a. Display length of string
b. Display no. of words
c. Display no. of vowels
d. Reverse string
Write a program to enter a list and then push all the zeros in the list to the end of the
list.
For example: If the list contains [0, 2, 3, 4, 6, 7, 0, 1], then the program should
re-arrange the
elements as [2, 3, 4, 6, 7,1, 0, 0]
Write a program to input a list containing names of cities and then display the
names of all those
cities that start with the alphabet ‘A’.
For example if the list contains [“AHMEDABAD”, CHENNAI”, “NEW DELHI”,
“AMRITSAR”,“ AGRA”],
then the program should print AHMEDABAD, AMRITSAR and AGRA.
You're creating a simple grading system for students. You need a function assign_grade()
that takes the score of a student (between 0 and 100) and assigns a grade based on the
following conditions:

●​ 90 or above: "A"
●​ 80 to 89: "B"
●​ 70 to 79: "C"
●​ 60 to 69: "D"
●​ Below 60: "F"

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy