Python Forum
How to print only vowels from an input?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to print only vowels from an input?
#1
Bug 
Hi everyone,
I am running into a task that needs your help.
The task is:
Ask for user input, and write a for loop that will output all the vowels within it. For example:
>>> "Hello" ➔ "eo"

My code is here:

word = input("Write your word here: ")
print(word)

for letter in word:
    if letter == 'aeiou':
        print(letter)
I really appreciate your help!
Thank you.
buran write Feb-26-2021, 12:46 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply


Messages In This Thread
How to print only vowels from an input? - by PP9044 - Feb-25-2021, 09:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Print user input into triangle djtjhokie 1 2,426 Nov-07-2020, 07:01 PM
Last Post: buran
  Counting Vowels in Python sapphosvoice 1 3,343 May-05-2020, 04:24 AM
Last Post: buran
  How to print the docstring(documentation string) of the input function ? Kishore_Bill 1 3,587 Feb-27-2020, 09:22 AM
Last Post: buran
  Print the longest str from user input edwdas 5 4,217 Nov-04-2019, 02:02 PM
Last Post: perfringo
  Return not vowels list erfanakbari1 2 2,726 Mar-26-2019, 11:37 AM
Last Post: perfringo
  Help with finding vowels nlord7 1 2,293 Feb-27-2019, 04:40 AM
Last Post: ichabod801
  Print The Length Of The Longest Run in a User Input List Ashman111 3 3,242 Oct-26-2018, 06:56 PM
Last Post: gruntfutuk
  Help Formatting Print Statement (input from 3 lists) X 2 Hebruiser 11 6,391 Dec-06-2017, 04:47 PM
Last Post: gruntfutuk
  Functions to remove vowels and extra blanks RiceGum 10 5,924 Nov-17-2017, 05:40 PM
Last Post: heiner55
  How to add user input together then print the result Liwuid_Ocelot 6 5,478 Mar-22-2017, 02:18 AM
Last Post: Liwuid_Ocelot

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020