Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

IN PYTHON Question 1: Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your

IN PYTHON Question 1: Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each number on a separate line. Sample Run 3 6 9 12 15 18 21

Question 2: Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the count of how many numbers were entered. Sample Run Enter a number: 1 Enter a number: 41 Enter a number: 36 Enter a number: 25 Sum: 103 Numbers Entered: 4

Question 3: Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. It should acknowledge the user in the following format. For the first pet it should say "You have a dog with a total of 1 pet(s)" if they enter dog, and so on. Sample Run: User enters: lemur parrot cat rock Outputs: You have a lemur with a total of 1 pet(s) You have a parrot with a total of 2 pet(s) You have a cat with a total of 3 pet(s)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions