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

Programming Assign Unit 5

This document outlines a programming assignment for a Computer Science course that involves string manipulation using Python. It describes three functions: one for displaying a specified number of characters from a name, one for counting vowels in the name, and one for reversing the name. The main program takes user input and demonstrates these functions.

Uploaded by

munyendoadam9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views3 pages

Programming Assign Unit 5

This document outlines a programming assignment for a Computer Science course that involves string manipulation using Python. It describes three functions: one for displaying a specified number of characters from a name, one for counting vowels in the name, and one for reversing the name. The main program takes user input and demonstrates these functions.

Uploaded by

munyendoadam9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Bachelor of Computer Science, University of the People

CS 1101-01 Programing Fundamentals

Dr. Giri Anandhi

20th December, 2023


Programming Assignment Unit 5

Below is my program show manipulation of the name using string and iteration.
Outputs

The function def display_left takes the input name which is string and displays characters {n} and uses
python string slicing to show the n character.

The function def count_vowels iterates each character from the name one by one checks if it is a vowel
and increments it accordingly and returns the number of vowels from the name.

The function def reverse_Name reverses the input name.

The main program then takes users input name and the number of characters and display it and then call
each function to demonstrate the name like left name display, count the number vowels and reverse the
name.

Reference:

[Link]

You might also like