Respuesta :
Answer:
# The user is prompt to enter the length of the string
length = int(input("Enter length of string: "))
# While the input length is greater than 100
# the prompt keep asking user to enter between 1 and 100
while (length < 1 and length > 100):
print("The length must be between 1 and 100")
length = int(input("Enter length of string: "))
# user is asked to enter the string
word = str(input("Enter the string: "))
# the new word is initialized as empty string
new_word = ""
# the vowel is placed in a list
vowel = ['a', 'e', 'I', 'o', 'u', 'A', 'E', 'I', 'O', 'U']
# for loop through the inputted word
# if the letter is in vowel, it skip
for letter in word:
if letter in vowel:
continue
else:
new_word += letter
# the new word is displayed to user
print(new_word)
Explanation:
The code is written in Python3 and it is well commented. Image of program output when it is executed is attached.
The program asked for the length of string and it make sure it is between 1 and 100.
It then asked for the string which is assigned to word. It then loop through the word, if it found a vowel, it skip else it concatenate with the new word.
