Python_Programming_Week4
1. Write a program “Lab4B” that prompts the user to enter a string and then: 1. Display the length of the string. 2. Convert all the vowels into lowercase and display the modified string. 3. Display a count of each of the vowels and the total number of vowels in the string. 4. Convert the string into list of words and display the length of the list. (Note: the input vowels may be either uppercase or lowercase letters.) 2. Write a program “Lab4B”that keeps prompting the user (until input of 0) for a distance in meters and then displays that distance converted to miles, feet and inches*. Please note that the value to be converted to feet in this problem is the decimal portion of the number of miles, and the value to be converted to inches is the decimal portion of the number of feet. It is not sufficient to simply convert the entire distance in meters to miles, feet and inches, respectively. HINT: use can use the Python int() function to return the decimal portion of your calculation for miles, feet and inches. Test with 5000 meters. Show that result in your screenprint. *1 meter = 0. miles. 1 mile = 5280 feet. 1 foot = 12 inches.
Written for
- Institution
- Python Programming
- Course
- Python Programming
Document information
- Uploaded on
- July 22, 2023
- Number of pages
- 3
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
pythonprogrammingweek4
Also available in package deal