Arizona State University Python File Script Coding Sample Run
Question Description
Instructions
- For each part of the lab; create a python file with the name; part#-ASURITE.py
- where # is the part of the lab
- ASURITE is your user name
- Example: part1-cjingers.py, part2-cjingers.py
- Submit all .py files as part of your submission
- Don’t forget the interpreter line!
- The output of your script must match the same format shown in the sample run for each part.
Part 1
Write a Python script that will prompt the user for monetary value (such as 11.26). Then, calculate the number of dollars, quarters, dimes, nickels, and pennies. Your solution should use the maximum possible number of dollars, then quarters and so on. For example; converting 11.26 to 1126 pennies is not acceptable.
Sample run
Enter an ammount of money: 11.56
Your amount of $11.56 consists of;
11 dollars
2 quarters
0 dimes
1 nickels
1 pennies
Part 2
Given two points, the formula for computing distance is;
Write a Python script that prompts the user for two points and computes the distance between them.A point is comprised of two floating point numbers; representing the x and y coordinates.
Sample run
Enter x1 and y1 for Point 1: 1.5, -3.4
Enter x2 and y2 for Point 2: 4, 5
The distance between (1.5, -3.4) and (4, 5) is 8.8
"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."