anonymous
  • anonymous
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
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
a) sum(range(1,11)) #sums numbers from 1 to 10 inclusive
anonymous
  • anonymous
Why you keep reposting this question?
anonymous
  • anonymous
Cos i haven'st got my answer yet.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
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.
anonymous
  • anonymous
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)
anonymous
  • anonymous
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)

Looking for something else?

Not the answer you are looking for? Search for more explanations.