Example HTML page

Python Exercise 11

Hi,

The following programs related to math module.

Please do the problems 1 to 12 from the following link.

1 to 12 questions

13. Write a python script to find the distance between two points (3,4) (7,8). round the result to two decimal places.

Psudocode of the formula: sqrt( (x2-y2)**2 – (x1-y1)**2).

14. Write a python script to find the difference between the distance between three points. Assume the points A(x1,y1), B(x2,y2), c(x3,y3). print the absolute value of AB-BC-CA. here AB is the distance between the two points i.e. A, B. after computing the result ceil it.

15. Write a python script to generate a random number between 100 to 200 and find the generated number is even or odd?

16. Write a python script to select a character from the vowels and display the ASCII value of the selected vowel.

17. Write a python script to generate a random number between “-10” to “10” [-10,10] and print the factorial of a selected number if it is positive. Otherwise, it should print a message that ” I will print the factorial for only positive number”. use factorial method from the math module.

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest