Ask Question
11 November, 14:17

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'.

+3
Answers (1)
  1. 11 November, 16:41
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers