Question: Task 02 (5 points) Write a Python script that will take the diameter of a circle and return the area of a circle with the
Task 02 (5 points)
Write a Python script that will take the diameter of a circle and return the area of a circle with the given diameter. Make sure you correctly import the math module!
| Input string | Expected output of script |
| Enter the diameter: 4 | The area is: 12.57 |
Task 03 (5 points)
Write a Python script that will take a string of names and return a list with the names sorted in alphabetical order.
| Input string | Expected output of script |
| Moe, Pierce, Eugene, Phil, Canberra, Bob, Fang, Scoot, Benedict, Julian | ['Benedict', 'Bob', 'Canberra', 'Eugene', 'Fang', 'Julian', 'Moe', 'Phil', 'Pierce', 'Scoot'] |
Task 04 (5 points)
Write a Python script that will act as a simple dice roller. It should prompt for the number of sides of the dice and then return a number between 1 and the given number.
| Input list | Expected output of script |
| Number of sides: 6 | You rolled a 4 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
