Rx: <10 min Av: 10-20 min Sd: 20-30 min DNF: 30+ min
In PyCharm, create two python files: maths.py
& mangle.py
.
Don’t forget to add a comment at the top of each program with your name and what the program does.
Write a program maths.py
that takes a number as input from the user and prints out the following information using the math module:
floor(3.75)
is 3)absolute_value
)absolute_value
rounded to 2 decimal places absolute_value
times -1Write a program mangle.py
that takes a string as input from the user and prints the string after performing the following operations:
For example:
string | mangle(string) |
---|---|
hellothere | HELOTHRE |
42 degrees Celsius | 42DEGREES CELSUS |