1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
worty [1.4K]
3 years ago
5

In English there are five vowel letters in the alphabet: A, E, I, O, U. For the purposes of this exercise we won't count Y as a

vowel. Write a program that takes a line of text as input and outputs the number of vowels in the words. Make sure to account for both uppercase or lowercase. You are encouraged to write functions and test code in IDLE before submitting your solutions here.
Computers and Technology
1 answer:
Vikki [24]3 years ago
3 0

Answer:

s = input("Enter a sentence: ")

count = 0

for c in s:

 if "AEIOU".find(c.upper()) >= 0:

   count = count + 1

print ("There are %d vowels." % (count))

Explanation:

Just for fun, here is a super short one using regex:

import re

s = input("Enter a sentence: ")

print ("There are %d vowels." % len(re.findall("[aeiou]",s.lower())))

You might be interested in
HURRY PLEASE ITS A TEST
laiz [17]

<em>A.)</em>

<em>It's either A or D both of them stand out and make sense to me so I think that it'll be right if you choose A or D.</em>

<em>-Ɽ3₮Ɽ0 Ⱬ3Ɽ0</em>

8 0
3 years ago
A wiki is best defined as:
Basile [38]

Answer:

a reverse chronological journaling site. a user-collaborated content site, typically text in nature

Explanation:

It is the website that is based on knowledge. It is the text based site that is also called structure content.

The most common example of Wiki is Wikipedia.

8 0
3 years ago
What is the significance of XML tags?
tatyana61 [14]

Answer:

your answer would be to ur question would be B

7 0
2 years ago
The information that a program requires in order to accomplish its objective is called the.
ivolga24 [154]

The information that a program requires in order to accomplish its objective is called input.

<h3>What is a program?</h3>

A program is a set of instructions by which the computer performs various tasks. The program is a sequence of instructions that are followed by the computer to run. An example is Microsoft Word.

A computer program comes under software. The sequence code of a program that is readable by humans is called source code. The program is run by information that is called input.

Thus, the data that a program needs in order to achieve its goal is referred to as input.

To learn more about the program, refer to the below link:

brainly.com/question/14368396

#SPJ4

8 0
1 year ago
Write a class named GasTank containing: An instance variable named amount of type double, initialized to 0. An instance variable
telo118 [61]

Answer:

The class GasTank is defined below

All the steps are briefed in comments

public class GasTank {

// instance variable initialization

private double amount = 0;

//declaring instance variable capacitance

private double capacity;

//constructor having parameter of type double

public GasTank(double i)

{

capacity = i;

}

// addGas method for increasing gas quantity.

public void addGas(double i)

//quantity of gas increased is added to the existing amount. If it becomes more than total capacity, amount is set to capacity

{ amount += i; if(amount > capacity) amount = capacity; / amount = amount < capacity ? amount+i : capacity;/ }

//useGas method having parameter of type double

public void useGas(double i)

//the parameter given is deducted from 0 and if results less than 0, remains equal to 0

{ amount = amount < 0 ? 0 : amount - i; }

//method isEmpty

public boolean isEmpty()

//Returns true if volume is less than 0.1 else false

{ return amount < 0.1 ? true : false; }

//method isFull

public boolean isFull()

//returns true if the value of amount is greater than  0.1 else false.

{ return amount > (capacity-0.1) ? true : false; }

//method getGasLeve

public double getGasLevel()

//Returns the value of amount instance variable

{ return amount; }

//method fillUp

public double fillUp()

//returns the difference between the capacity and the amount

{ double blah = capacity - amount; amount = capacity; return blah; }

}

5 0
3 years ago
Other questions:
  • Write a program that loops one thousand times. add all the even numbers and display the results. add all the odd numbers and dis
    13·1 answer
  • Which phone has the most GB (Gigo Bites)<br><br>A.Samsung<br>B.Iphone<br>C.LG<br>D.ZTE
    10·2 answers
  • The steps for creating a newsletter are to ____.
    10·1 answer
  • You are manually configuring a tcp/ip host. another administrator gives you the router's ip address. what is the tcp/ip term for
    6·2 answers
  • The ___________ button represents the start of a hyperlink in Table of contents.
    7·1 answer
  • Write a program get_price.py with a function get_price() that takes a dictionary of fruits as an argument and returns the name o
    6·1 answer
  • Which of the following technologies is an example of social media
    12·1 answer
  • ____ is a technique for confirming that q received packet or frame is likely to match what was sent
    15·1 answer
  • 5 efectos del desarrollo tecnológico en el medio ambiente
    14·1 answer
  • What do you think that private information like passwords pin number will be guarded or shared with the public? why?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!