Usetutoringspotscode to get 8% OFF on your first order!

  • time icon24/7 online - support@tutoringspots.com
  • phone icon1-316-444-1378 or 44-141-628-6690
  • login iconLogin

Python

Python
1-Write a function area that has two arguments, height and width, and returns the area of a rectangle of the given height and width. Your function area should not print anything out, nor should it ask the user for input, it should compute and return the area. Also write a main function that calls your function area with some sample input, printing out the computed area.

2-Write a function hypotenuse that has two arguments, base and height, and returns the length of the hypotenuse in a right triangle of the given base and height. Your function hypotenuse should not print anything out, nor should it ask the user for input, it should compute and return the length of the hypotenuse. Also write a main function that calls your function hypotenuse with some sample input, printing out the computed hypotenuse.

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Python

Python
1-Write a function area that has two arguments, height and width, and returns the area of a rectangle of the given height and width. Your function area should not print anything out, nor should it ask the user for input, it should compute and return the area. Also write a main function that calls your function area with some sample input, printing out the computed area.

2-Write a function hypotenuse that has two arguments, base and height, and returns the length of the hypotenuse in a right triangle of the given base and height. Your function hypotenuse should not print anything out, nor should it ask the user for input, it should compute and return the length of the hypotenuse. Also write a main function that calls your function hypotenuse with some sample input, printing out the computed hypotenuse.

Responses are currently closed, but you can trackback from your own site.

Comments are closed.

Powered by WordPress | Designed by: Premium WordPress Themes | Thanks to Themes Gallery, Bromoney and Wordpress Themes