Ask Question
30 September, 20:41

Write a Python program where the user enters the number of elements in a list 'n' and those 'n' numbers that form the list. The user also enters a number 'm' by which all the elements of the list are multiplied and printed. You must print both the list before multiplying and the list after multiplied by the number 'm'.

+5
Answers (1)
  1. 30 September, 20:50
    0
    lst = []

    multiple = []

    num = int (input ('How many numbers: '))

    multipleOf = int (input ('Enter the number to multiply with: '))

    for n in range (num):

    lst. append (n)

    numbers = n * multipleOf

    multiple. append (numbers)

    print ("elements in given list is : ", lst)

    print ("multiple in given list is : ", multiple)

    Explanation:

    User will enter the number and then enter the number to multiply that list.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a Python program where the user enters the number of elements in a list 'n' and those 'n' numbers that form the list. The user also ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers