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]
3 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]3 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
In order to organize your work effectively on the computer, where is the best place to save it?
Morgarella [4.7K]
Your answer is -

B. Folder Is the best place to save it
8 0
3 years ago
Read 2 more answers
Is greedy algorithm non deterministic by nature?
Flura [38]

Answer: Yes

Explanation: Greedy algorithm is the algorithm that gives the solution to the problem on the basis of the piece by piece or step by step architecture.  the next step of the solution is based on the aim of solving problem optimally.But the steps chosen can be correct or incorrect.

Non-deterministic nature is the feature that determines that the  steps that is being chosen is not the most optimal one and no high surety is present.Thus, this nature is present in the greedy algorithm and it has non-deterministic nature.

7 0
3 years ago
Technician A says that wheel speed sensors are a highly probable cause of illuminated EBC warning lamps. Technician B says that
Blababa [14]

Technician A because

3 0
2 years ago
Write multiple if statements: If carYear is before 1967, print "Probably has few safety features." (without quotes). If after 19
Liono4ka [1.6K]

Answer:

public class Main

{

public static void main(String[] args) {

    int carYear = 1995;

   

    if(carYear < 1967)

        System.out.println("Probably has few safety features.");

    if(carYear > 1971)

        System.out.println("Probably has head rests.");

    if(carYear > 1992)

        System.out.println("Probably has anti-lock brakes.");

    if(carYear > 2002)

        System.out.println("Probably has tire-pressure monitor.");

   

}

}

Explanation:

The code is in Java.

Initialize the carYear

Use if statements to handle year before 1967, after 1971, after 1992 and after 2002.

Print the required message for each if statement

5 0
3 years ago
Which of the following items is not considered a personal risk factor for ergonomic hazards? A. Body size B. Medical condition C
serious [3.7K]
I think it might be a. body size .
6 0
3 years ago
Read 2 more answers
Other questions:
  • You can use Facebook's live feed tool to broadcast content as you post it
    8·2 answers
  • If you were to conduct an Internet search on vegetarian restaurants, which of the following searches would be the best
    7·1 answer
  • What type of device is built into a tablet computer and can send data over radio waves to another device such as a laser printer
    10·1 answer
  • Find a, b, and c<br> A a=4 square root of 6 b= 8 square root of 2 ; c= 4 square root of 2
    12·1 answer
  • In Microsoft Word, how would you change the amount of space that is put in after each paragraph?
    15·1 answer
  • Which relationship is possible when two tables share the same primary key? one-to-one one-to-many many-to-one many-to-many
    15·2 answers
  • PLZZZ HELP 30 POINTS!!
    14·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • When does a soft page break occur in a document
    9·1 answer
  • I hope The characters That I want in Mortal kombat 12 is Lori and peron That’s My character wishlist in The next Mortal kombat g
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!