Write a Python code for the following: Ask the user to enter a number, N (Total number of inputs to be taken). Assume that the user will never enter the first number as zero. Take N number of inputs Prints out the product of all the numbers read For example, if the first input is 4, then the program has to read in four numbers from the user and print the product of these four numbers.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question

Write a Python code for the following:

  • Ask the user to enter a number, N (Total number of inputs to be taken). Assume that the user will never enter the first number as zero.
  • Take N number of inputs
  • Prints out the product of all the numbers read

For example, if the first input is 4, then the program has to read in four numbers from the user and print the product of these four numbers.

Example01:
Input:
5
10
6.
4
2
1
Output:
480
Explanation:
5 is the total number of inputs taken. Then, the calculation should be 10 X 6X 4 X 2 X 1= 480
Transcribed Image Text:Example01: Input: 5 10 6. 4 2 1 Output: 480 Explanation: 5 is the total number of inputs taken. Then, the calculation should be 10 X 6X 4 X 2 X 1= 480
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT