Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4-6 Please. Python 3.6. def main(). entered by a user. Write a program that finds the sum and average of a series of numbers

Question 4-6 Please.

Python 3.6. def main().

image text in transcribed

entered by a user. Write a program that finds the sum and average of a series of numbers he program should first prompt the user to enter total numbers of numbers are to be summed and averaged. It should then as for input for each of the numbers, add them, and print the total of the numbers and their average 2. Write a progra m that finds the area of a circle. The radius is entered by the user. Two points in a plane are specified using the coordinates (x1, yl) and (x2, y2). Write a program that calculates the slope of a line through two (non-vertical) points entered by the uscr. m 2-yl Using this same point, your program should also determine the distance between (xl and (x2, y2). Use the following formula to calculate distance x2 x1 , y1) 4. Write a program that finds the sum of the squares for the first n natural numbers. 5. Write a program to find the sum of the cubes of thc first n natural numbers where the valuc of n is provided by the user 6. Write a program which takes 2 digits, X, Y as input from the keyboard and calculates the sum of the integers from X to Y. In context, X is smaller than Y Examplc: if the input is 1, 3, your program output will be 6

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

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

Students also viewed these Databases questions