Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise 1: For Loops In this exercise, you will be writing a Python program that will do the following: 1. It will ask the user

image text in transcribed

Exercise 1: For Loops In this exercise, you will be writing a Python program that will do the following: 1. It will ask the user to specify a number and then specify a name of an object. 2. Then it will output on the screen according to the following example. So, for example, when the user enters "bird" as the character and 11 as the number, your program will output: I saw 1 birds. I saw 2 birds. I saw 3 birds. I saw 4 birds. I saw 5 birds. I saw 6 birds. I saw 7 birds. I saw 8 birds. I saw 9 birds. I saw 10 birds. I saw 11 birds. Exercise 2: While Loops In this assignment, you will be writing a Python program that will do the following: 1. It will ask the user to keep entering positive numbers until they enter -1. 2. As the numbers are being entered one by one, your program will keep track of the product of all the numbers entered so far. 3. In the end, the program will print the number of numbers and their product. So, for example, when the user enters 10,2,1, and 15, the program will output: You entered 4 numbers and their product is 300

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

How can a healthcare data analyst support the medicine industry?

Answered: 1 week ago