n texting or tweeting, it’s not uncommon to shorten words to save time or space, as by omitting vowels, much like Twitter was originally called twttr. In a file called twttr.py, implement a program that prompts the user for a str of text and then outputs that same text but with all vowels (A, E, I, O, and U) omitted, whether inputted in uppercase or lowercase

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 12RQ
icon
Related questions
Question

When texting or tweeting, it’s not uncommon to shorten words to save time or space, as by omitting vowels, much like Twitter was originally called twttr. In a file called twttr.py, implement a program that prompts the user for a str of text and then outputs that same text but with all vowels (A, E, I, O, and U) omitted, whether inputted in uppercase or lowercase.

USE PYTHON 

PLEASE SEE IMAGE FOR MORE DETAILS.

THANKS.

Hints
• Recall that a str) comes with quite a few methods, per
docs.python.org/3/library/stdtypes.html#string-methods
. Consider the using the replace() method.
Much like a
list), a str is "iterable," which means you can iterate over each of its characters in a loop. For instance, if (s) is a str), you could print each of its characters, one at a time, with code like:
for c in s:
print(c, end="")
Demo
$ python twttr.py
Input: Twitter
Output: Twttr
$ python twttr.py
Input: What's your name?
Output: Wht's yr nm?
$ python twttr.py
How to Test
Here's how to test your code manually:
• Run your program with python twttr.py). Type (Twitter) and press Enter. Your program should output:
Twttr
• Run your program with python twttr.py). Type (what's your name? and press Enter. Your program should output:
Wht's yr nm?
• Run your program with python twttr.py. Type (csse) and press Enter. Your program should output
CS50
Transcribed Image Text:Hints • Recall that a str) comes with quite a few methods, per docs.python.org/3/library/stdtypes.html#string-methods . Consider the using the replace() method. Much like a list), a str is "iterable," which means you can iterate over each of its characters in a loop. For instance, if (s) is a str), you could print each of its characters, one at a time, with code like: for c in s: print(c, end="") Demo $ python twttr.py Input: Twitter Output: Twttr $ python twttr.py Input: What's your name? Output: Wht's yr nm? $ python twttr.py How to Test Here's how to test your code manually: • Run your program with python twttr.py). Type (Twitter) and press Enter. Your program should output: Twttr • Run your program with python twttr.py). Type (what's your name? and press Enter. Your program should output: Wht's yr nm? • Run your program with python twttr.py. Type (csse) and press Enter. Your program should output CS50
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT