Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi , I'm in grade 10 studying computer science and i need Python programs for the following questions, in grade 10 level. One question for

Hi , I'm in grade 10 studying computer science and i need Python programs for the following questions, in grade 10 level. One question for Iteration for loop and three questions for Iteration while loop. Thanks!

Python- Iteration for loop

1. If a b = n, we call a b a factorization of n. In this exercise, write a program that takes a positive integer from input, and then outputs all factorizations of n; you should follow the formatting given by the following example for n=10.

1 times 10 equals 10

2 times 5 equals 10

5 times 2 equals 10

10 times 1 equals 10

Python- Iteration while loops

1. Write a Python program to find and print those numbers which are divisible by 7 and multiples of 5, between 1500 and 2700 inclusive.

2. Write a Python program which iterates the integers from 1 to 50. For multiples of three print "Bizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "BizzBuzz" otherwise print the number itself.

3. Write a Python program that asks the user to guess a number between 1 to 9. The program should generate a random number between 1 and 9. The user is prompted to enter a guess. If the user guesses wrong then the prompt appears again until the guess is correct, on successful guess, user will get a "Well guessed!" message, and the program will exit.

Note: To generate a random number, import random.

randint(a, b) will generate a random number between a and b, inclusive

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_2

Step: 3

blur-text-image_3

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

Question

2. Develop a persuasive topic and thesis

Answered: 1 week ago

Question

1. Define the goals of persuasive speaking

Answered: 1 week ago