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
Open and close ____ immediately following the name of a procedure identify a Visual Basic statement as a procedure call statemen
Bezzdna [24]

Answer:  Parentheses

Explanation:

 The open and close parentheses basically identify the visual basic statement   in the procedure call statement.

The close procedure basically in the visual basic statement basically terminate the call of a program that performed the real processing. Open and close is also known as right and left parentheses.

The close statement is basically control the pre-defined programming statement in the particular close procedure.

 

4 0
4 years ago
Shift Registers. What is a Bit Shift Register? What are the different types of Bit Shift Registers and what might be their appli
lesya [120]

Answer:

Digital logic circuits made of cascaded flip flops.

The different types of Bit Shift Registers are; Serial-In Serial-Out, Parallel-In Parallel-Out, Serial-In Parallel-Out, Parallel-In Serial-Out.

Shift registers can be used as converters to translate data, as delay circuits or counters.

Explanation:

Shift Registers are digital logic circuits made of cascaded flip flops. Their main function is to shift their contents (bits) to the right or to the left one bit at a time. Bit Shift Registers can process data either parallelly or serially. So the different types of Bit Shift Registers are;

  • Serial-In Serial-Out
  • Parallel-In Parallel-Out
  • Serial-In Parallel-Out
  • Parallel-In Serial-Out

Because of their ability to convert data from parallel to serial, shift registers can be used as converters to translate data. Some of their other applications are also delay circuits or counters, storing and manipulating data etc.

I hope this answer helps.

8 0
3 years ago
You can access decorative underlines and change their color through the ____ drop-down.
Dominik [7]
The answer is "underline gallery or underline drop-down". The user can access the decorative underlines and change the underline's color through the underline gallery. Underlines can be added for decoration purposes, to make your work look formal or creative.
4 0
3 years ago
How to fix this.. facing this problem to upload logo
AlekseyPX
I use an app called codechecker that helps with me having issues like that cause 99% of the time I'll mess it up.
7 0
3 years ago
Write a function named countEvens that counts and returns the number of even integers in an array. The function must have this h
skelet666 [1.2K]

Answer:

function countEvens(list) {

   // IMPLEMENT THIS FUNCTION!

var even = [];

 

for(var i = 0; i < list.length; i++){

 if (list[i] % 2 == 0){

   even.push(list[i]);

   

 }

}

 return console.log(even)

}

var list = [ 17, 8, 9, 5, 20 ];

var count = countEvens(list);

Explanation:

The programming language used is JavaScript.

An even variable is initialized, to hold  the even variables within list.

A FOR loop loop iterates through all the elements in the list, an IF statement is used to check using the modulo division to check if the elements in the list are even.

The even elements are appended to the even list using .push() method.

Finally, the function returns the even list and outputs the list to the log using console.log(even) .

A list is created and the function is called.

4 0
3 years ago
Other questions:
  • ___________ is a mass-produced, copyrighted software that meets the needs of a wide variety of users, not just a single user or
    15·1 answer
  • Which feature of a blog marks a unique link to each post through which it can be recalled anytime?
    8·2 answers
  • if image size and resolution are the same, which file format, .jpg, .gif, .or .tiff, will give you the smallest file size?
    8·2 answers
  • central, secure database in which Windows stores hardware and software configuration information and system security policies is
    12·1 answer
  • Which of the items listed is not considered to be personal protective equipment (PPE)?
    14·1 answer
  • you are teaching a class about basic camera functions like power, basic date/time, menu navigation, and how to properly attach a
    9·1 answer
  • Which one of these is the range for a Class C address?
    12·2 answers
  • HELP PLSS‼️ Which are the following are considered peripherals? Mark all that are correct
    11·1 answer
  • What is branching in Python​
    7·1 answer
  • What is the best example of how computers have changed the way people communicate?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!