Computer Science, asked by ishita99130, 7 months ago

Write a program to input three numbers and print the sum and average of three numbers
entered as well for the sum of their squares and average of their squares.​

Answers

Answered by Anonymous
3

Answer:

Python Basic: Exercise-18 with Solution

Write a Python program to calculate the sum of three given numbers, if the values are equal then return thrice of their sum.

Pictorial Presentation:

Sample Solution:-

Python Code:

def sum_thrice(x, y, z): sum = x + y + z if x == y == z: sum = sum * 3 return sum print(sum_thrice(1, 2, 3)) print(sum_thrice(3, 3, 3))

Copy

Sample Output:

6 27

Flowchart:

Visualize Python code execution:

The following tool visualize what the computer is doing step-by-step as it executes the said program:

Python Code Editor:

 

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a Python program to test whether a number is within 100 of 1000 or 2000.

Next: Write a Python program to get a new string from a given string where "Is" has been added to the front. If the given string already begins with "Is" then return the string unchanged.

What is the difficulty level of this exercise?

EASY MEDIUM HARD

Based on 216 votes, average difficulty level of this exercise is Easy .

Test your Python skills with w3resource's quiz



Python: Tips of the Day

Python: List comprehension

a = [1, 2, 3] b =

please mark me as brainliest answer pls please and give thanks

Answered by mdwais86gmailcom
0

Explanation:

Write a Python program to calculate the sum of three given numbers, if the values are equal then return three times of their sum.

Similar questions