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
Darina [25.2K]
3 years ago
11

python Assume letters A, E, I, O, and U as the vowels. Write a program that prompts the user to enter a string and displays the

number of vowels and consonants in the string.
Computers and Technology
1 answer:
Roman55 [17]3 years ago
8 0

Answer:

vowels = 0

consonants = 0

string = input("Enter string: ")

for x in string:

   if x.isalpha():

       if x in "AEIOU":

           vowels += 1

       else:

           consonants += 1

print("Vowels =",vowels)

print("Consonants =",consonants)

Explanation:

You might be interested in
Changing the color of the text in your document is an example of
nexus9112 [7]

Answer:

???????????uhhh text change..?

Explanation:

7 0
3 years ago
Read 2 more answers
Boole’s theories of logic set the foundation for what aspect of computing today?
AlekseyPX

Answer:

Software aspect of computing

Explanation:

Boole never regarded logic as a branch of mathematics, instead, he proposed that logical propositions should be expressed as algebraic equations. Mathematical operations were replaced with AND, OR.

Boolean algebra provides the basis for analyzing the validity of logical propositions because it captures the two-valued character (binary:  (1 or 0) ) of statements that may be either true or false which is very important for all digital computation of which softwares are part of.

7 0
3 years ago
Which routine is configured to execute first when the program runs?
tester [92]
It's D because of ok
4 0
3 years ago
Suppose we have a dictionary called grades as shown below:
mihalych1998 [28]

Answer:

import statistics as st # importing statistics package to calculate mean as st.

grades = {"John": [87,90,86.8], "Mary": [78, 81.5, 88.6],"Susan":[45,67,76]}

for key,value in grades.items():#iterating over the dictionary

   average_score=st.mean(value)#calculating the mean of every student

   gr="" empty string to store the grades

   if average_score>=90: # nested if else if and statements for the grades in gr

       gr="A"

   elif average_score>=80.0 and average_score<90.0:

       gr="B"

   elif average_score>=70.0 and average_score<80.0:

       gr="C"

   elif average_score>=60.0 and average_score<70.0:

       gr="D"

   else :

       gr="F"

       

   print(str(key)+" "+str(average_score)+" "+str(gr)) #printing grades of every student.

Output:-Mary 82.7 B

John 87.93333333333334 B

Susan 62.666666666666664 D

Explanation:

1.In this program we are iterating over the dictionary grades.

2.Storing and calculating the mean of the scores of every student us statistics package.

3.Storing the grade in string gr and updating the gr according to the mean score

4.After that printing the grade of the student with their name and mean score.

6 0
3 years ago
Theo would like to apply formatting to record data based on values in comparison with values in other fields. Which option shoul
poizon [28]

Answer:

Conditional Formatting

Explanation:

A database management system (DBMS) can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

A data dictionary can be defined as a centralized collection of information on a specific data such as attributes, names, fields and definitions that are being used in a computer database system.

In a data dictionary, data elements are combined into records, which are meaningful combinations of data elements that are included in data flows or retained in data stores.

This ultimately implies that, a data dictionary found in a computer database system typically contains the records about all the data elements (objects) such as data relationships with other elements, ownership, type, size, primary keys etc. These records are stored and communicated to other data when required or needed.

Conditional formatting is a feature found in a lot of spreadsheet software applications such as Microsoft Excel and it avails end users the ability to apply specific formatting options to cells based on certain defined criteria.

Basically, it is used for highlighting, emphasize, comparing or differentiating between data (information) stored in a spreadsheet document i.e data values that are lesser than or greater than a specificied value.

In this scenario, Theo would like to apply formatting to record data based on values in comparison with values in other fields. Thus, the option he should use is conditional formatting.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that asks how many tickets for each class of seats were sold, then displays the amount of income generated from
    10·1 answer
  • True/False: If a function is legally prototyped to return an integer value, it can return a structure member that is an integer
    11·1 answer
  • Effective character encoding requires:
    8·1 answer
  • I need help with Microsoft.
    6·1 answer
  • Which color reflects more light red blue black or white
    6·1 answer
  • How can you get access to Help? Click all that apply.
    5·2 answers
  • Quantas calorias os adolescentes devem consumir diariamente?
    14·1 answer
  • At age 16 Cheyanne just got her drivers license
    5·2 answers
  • Role of computers in everyday life​
    15·1 answer
  • EEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIII
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!