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
erik [133]
2 years ago
9

Write a Python program that gets a single character from the user and writes out a congratulatory message if the character is a

vowel (a, e, i, o, or u), but otherwise writes out a "You lose, better luck next time" message.
Computers and Technology
1 answer:
DochEvi [55]2 years ago
8 0

Answer:

def vowel(a):  #function to detect whether the character is vowel or not.

   vow=['a','e','i','o','u'] #list of vowels.

   if a in vow:

       return True

   else:

       return False

       

character=str(input("Enter the character \n")) #taking input.

if vowel(character.lower()):#checking the character is vowel using the function vowel..

   print("Congratulations!!!!") #congratulating.

else:

   print("You lose better luck next time")#message.

Output:-

Enter the character  

a

Congratulations!!!!

Explanation:

I have created a function to check whether the given character is a vowel or not.

After that taking input from the user.

And checking that it is vowel or not.If it is vowel then printing the message.

You might be interested in
A user complains that his computer automatically reboots after a short period of time. Which of the following computer component
Oduvanchick [21]

Answer:

The answer is "option a".

Explanation:

To resolve the automatic reboot problem we must change the CPU cooling fan because if we don't change a computer fan so, it will be heated and damage other components. This cooling fan used inside the CPU. It expels warm air from inside and moves air across the particular component. and other options are not correct that can be described as:

  • In option b, power supply is used to turn on the computer. It is not used to solve the reboot problem.
  • In option c,  Motherboard is to serve as the base upon which a computer's components are built.  
  • In option d, It is primarily used to store the data.  

6 0
2 years ago
Choose the correct term to complete the sentence.
devlian [24]
Smartphones! because mobile apps go on smartphones
8 0
2 years ago
Read 2 more answers
If you are going to develop a special computer, what would it be and explain it's purpose.​
Ann [662]

Answer:

It would be to figure out what cancers someone could exactly so no need for a biopsy

4 0
3 years ago
What is the HIPAA Privacy rule, and why does it affect IT professionals?
CaHeK987 [17]

Solution:

The HIPAA Privacy Rule establishes national standards to protect individuals' medical records and other personal health information and applies to health plans, health care clearinghouses, and those health care providers that conduct certain health care transactions electronically.

IT affects it by these ways:

The HIPAA Privacy Rule for the first time creates national standards to protect individuals’ medical records and other personal health information.

• It gives patients more control over their health information.

• It sets boundaries on the use and release of health records.

• It establishes appropriate safeguards that health care providers and others must achieve to protect the privacy of health information.

• It holds violators accountable, with civil and criminal penalties that can be imposed if they violate patients’ privacy rights.

• And it strikes a balance when public responsibility supports disclosure of some forms of data – for example, to protect public health.

This takes for patient.

• It enables patients to find out how their information may be used, and about certain disclosures of their information that have been made.

• It generally limits release of information to the minimum reasonably needed for the purpose of the disclosure.

• It generally gives patients the right to examine and obtain a copy of their own health records and request corrections.

6 0
2 years ago
Which statement outputs a double value in a field of nine characters with three digits after the decimal point?
zimovet [89]

Answer:

Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

Explanation:

Following are the program in c#

using System; // namespace  

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace Tasks

{

   class Program 2 // program2

   {        

                 

       static void Main(string[] args) // Main function

       {

 

           double num = 958254.73789621;   // variables          

           Console.WriteLine("Format Double: {0:n3}", num); //formatting output with 3 digit decimal point

           Console.Read();

       }

   }

}

Output:

Format Double : 958254.737

Here we have declared  a variable num of type double which store the value num=958254.73789621. To do format with the double number i used a syntax {0:n3}. This syntax {0:n3}is separated with :(colon) here 0 represent the value before the decimal point that is 958254 and n3 represent the value upto 3 decimal points. Hence this statement give the output with three digit after the decimal point .

 

3 0
3 years ago
Other questions:
  • If a gas gosts 3.60 per gallon how much doe sit cost to drive 500 miles in the city
    5·1 answer
  • Which organization publishes a handbook that describes various occupations?
    12·1 answer
  • A computer abuse technique called a ____ involves inserting unauthorized code in a program, which, when activated, may cause a d
    11·1 answer
  • Describe any four rights of users of information systems.
    8·1 answer
  • 3. The invention of the transistor was important to the development of computers because it
    5·1 answer
  • List and describe the tools for all the main stages of app/application development.
    11·1 answer
  • What output is generated by this for loop?
    6·1 answer
  • A sum of JS300 is divided in the ratio 2:3.
    9·1 answer
  • Why is a salt added to a password that is being stored in a database?
    5·1 answer
  • What is the name of the method generated when you double-click a button named btnprocess in the form designer?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!