Problem 1 – multiply.py: Multiplication [5 points] Write a program that takes two floating point values x and y from the command line and prints their product.
Problem 2 – distance.py: Euclidean distance [5 points] Write a program that takes two floating point values x and y as command-line arguments and prints the distance of the point (x, y) from the origin (0, 0). Use math.sqrt().
Problem 3 – order_check.py: Order checking [20 points] Write a program that takes three double values x, y, and z as command-line arguments and prints True if the values are strictly ascending or descending (i.e., x < y < z or x > y > z), and False otherwise.
Problem 4 – biased_flip.py: Biased coin flip [20 points] Write a program that takes one floating point argument p and prints out at random either True with probability equal to p, or False with probability equal to 1 − p. Note that a fair coin would correspond to the input p = 0.5. Use random.random() in your solution
see attachment for details
Looking for solution of this Assignment?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |