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
alex41 [277]
3 years ago
7

Write a python program to find factorial, use exception handling and display an appropriate message if the user inputs alphabets

instead of the number. Emulate Index error for a list and handle that exception. Find factorial for all numbers in a given list and display the result.
Computers and Technology
1 answer:
MrRissso [65]3 years ago
6 0

def func(lst):

   fac_lst = ([])

   try:

       for x in lst:

           i = 0

           fac = 1

           while i < x:

               fac *= (x - i)

               i += 1

           fac_lst.append(fac)

       return fac_lst

   except TypeError:

       return "Please input only numbers!"

   except IndexError:

       return "Please stay within the index!"

lst = ([1, 2, 3, 4, 5, 6, 7, 8])

print(func(lst))

I think this is what you're looking for. Best of luck.

You might be interested in
What is what is a network that is easy to maintain and cheap ​
kifflom [539]

Answer:

Click at the pic above and the ans will appear.

Hope it helps :)

4 0
3 years ago
What were the first microblogs known as
Greeley [361]
The first micro blogs was once known a tumblogs
6 0
3 years ago
Read 2 more answers
North Hills College has decided to implement a new registration system that will allow students to register online, as well as i
olga_2 [115]

Answer:

In IT sector IT manager decides to have a JDA(joint Application Development) session first he has to keep the leader for it, The leader must be well educated and highly professional based experienced regarding the sector that he is dealing with it. JAD team will participate in discussions and plan to develop the criteria etc., There must be minimum of 3 to 4 members are needed for the discussion and provide support. The main agendas of the JAD session are

Agenda and different stages:

First they introduce the JAD members and see the requirements. They discuss the reason for the project and management. After that they provide clear view on the project and overview and discuss up to the clarification. Review the project and divide team members in to 2 to 3 members and allocate for the particular work. Discuss and develop all requirements and provide prototypes and all. finally report and prepare documentation and send it to the JAD team.

The main roles of the JAD team are: Managers who are provided for this team must research and provide the information on the particular project. Users who provide d information must see the line and developing level. The system analysis and object it managers look after issues, backups etc.,

Explanation:

See attached picture.

6 0
3 years ago
What will you see on the next line?
sammy [17]

Answer:

c [2, 3.5, 7, 9]

Explanation:

8 0
3 years ago
n 3 to 4 sentences, write a note to a friend describing how to move text from one part of a document to a different part of the
EleoNora [17]
Select the part you want to move.  Highlight it, and click ctrl+x.  Then, go to the place you want to put it.  Click ctrl+v.  It should be cut and pasted
8 0
3 years ago
Read 2 more answers
Other questions:
  • Because HTML was designed as a cross-platform language, it is the preferred method of communicating with back-end databases. Tru
    8·1 answer
  • In what country did true printing first take place?
    12·2 answers
  • The function below takes a single string parameter: sentence. Complete the function to return a list of strings indicating which
    5·1 answer
  • Write a program that asks the user to enter two numbers,obtains the two numbers from the user and prints the sum,product,
    6·1 answer
  • ______________is a collection of technologies for abstracting the details of how applications, storage, network, and other compu
    6·1 answer
  • Which variable name is the best to hold the area of a rectangle?<br> 1A<br> area<br> AREA<br> a
    13·1 answer
  • _____ refers to unsolicited commercial emails, usually sent to a large number of people with little regard to the users interest
    14·1 answer
  • What type of filtering software divides email messages that have been received into two piles, spam and non-spam and then analyz
    13·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • Have a good christmas. this might not be homework, but i just want everyone to have a good week
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!