Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
WilsonWorla
Group Title
Write a program that finds
a.sum
b. average
c.product of sum and average for all numbers divisble by 7. The user should provide both the upper bound and the lower bound
2.write a program that finds the minimum number out of n numbers and the user should provide the numbers
NB: All programs should be in python
 2 years ago
 2 years ago
WilsonWorla Group Title
Write a program that finds a.sum b. average c.product of sum and average for all numbers divisble by 7. The user should provide both the upper bound and the lower bound 2.write a program that finds the minimum number out of n numbers and the user should provide the numbers NB: All programs should be in python
 2 years ago
 2 years ago

This Question is Closed

estudier Group TitleBest ResponseYou've already chosen the best response.0
a) sum(range(1,11)) #sums numbers from 1 to 10 inclusive
 2 years ago

estudier Group TitleBest ResponseYou've already chosen the best response.0
Why you keep reposting this question?
 2 years ago

WilsonWorla Group TitleBest ResponseYou've already chosen the best response.0
Cos i haven'st got my answer yet.
 2 years ago

WilsonWorla Group TitleBest ResponseYou've already chosen the best response.0
I want to modify this python program: n = int(input ("enter the number input; ")) sumN = 0 for nCount in range(n): inputNumber = int(input("Enter your next number; ")) sumN += inputNumber average = sumN/n print "The sum of the number is; ",sumN print "The average of the number is; ",average to meet the requirements of of the question posed.
 2 years ago

DanSraer Group TitleBest ResponseYou've already chosen the best response.1
this is my solution for your first request: a = input("Enter the lower bound: ") b = input("Enter the upper bound: ") def my_function(a, b): if type(a) == int and type(b) == int: my_list = [] for i in range(a, b + 1): if i % 7 == 0: my_list.append(i) my_sum = float(sum(my_list)) my_average = float(my_sum / len(my_list)) my_product = my_sum * my_average print my_sum print my_average print my_product else: print "Invalid input data" my_function(a, b)
 2 years ago

DanSraer Group TitleBest ResponseYou've already chosen the best response.1
my solution for your second request is: my_list = [] def my_function(*args): response = raw_input("Do you want to introduce a new number? ") if response != "y" and "Y": print "This program ends now." else: n = input("Your number is: ") my_list.append(n) my_function() my_function() print "The answer is: ", min(my_list)
 2 years ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.