Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For Programming Assignment 1 , you are required to write Python scripts ( or programs ) that compute the following. [ MO 1 . 2

For Programming Assignment 1, you are required to write Python scripts (or programs) that compute the following. [MO 1.2]
(a) Write a script to compute and print the surface area of a sphere with radius 10. The surface area is given by 4\pi r^2 where r is the radius and \pi is 3.14. Your script should include in-code comments as necessary to allow a reviewer of the program to understand the objective and functioning of it. Comments in Python begin with the # character.
(b) Write a script for computing and printing the speeding fine of a motorist. Assume the speed limit is 65 mph, the motorist was traveling at 85 mph and the ticket is $5 for each mph over the speed limit. Your script should include in-code comments as necessary to allow a reviewer of the program to understand the objective and functioning of it. Comments in Python begin with the # character.
Submit your programs as script files named COS-101_PA1a_.py and COS-101_PA1b_.py, respectively.

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

IBM Db2 11 1 Certification Guide Explore Techniques To Master Database Programming And Administration Tasks In IBM Db2

Authors: Mohankumar Saraswatipura ,Robert Collins

1st Edition

1788626915, 978-1788626910

More Books

Students also viewed these Databases questions

Question

4. What are the current trends in computer software platforms?

Answered: 1 week ago