Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me add a python string to this python code to ask for vowels within the string or input. string _ input = input

Please help me add a python string to this python code to ask for vowels within the string or input.
string_input = input("Enter string: ")
# Code responsible for counting characters
letter_to_count = input ("Enter a character to count in the string: ")
character_count = string_input.count (letter_to_count)
# Code responsible for case conversion
words = string_input.split() # String is split into words
upper_case_letter =[word.capitalize() for word in words] # Each first letter of each word is capitalized
title_case_string =''.join(upper_case_letter) # Works are brought back together as a string
Code responsible for checking if specific initials are present
initials = input("Enter your initials: ").upper()
initials present = initials in string_input.upper()
# Code responsible for displaying results
print (f"Character '(letter_to_count)' count in the string: (character count}")
print (f"String in title case: {title_case_string}")
print (f"Are your initials ({initials}) present in the string? ('Yes' if initials present else 'No'}")
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions