Now use PyCharm and create a project lab 5 Within it do az many of the following
ID: 3907027 • Letter: N
Question
Now use PyCharm and create a project lab 5 Within it do az many of the following problems as you have time for. Upload your final versions of each requested px,file inverse.py)Write functions km to miles (?) and miles to kn (niles) (miles=km*0 62137). First, [L52] (test have each function return a float result without rounding to two decimals Then create and run at least five (5) simple PyTest unit tests in the same file, checking that km to miles (miles .to km (km)) ? for various values of kon Add five more D esttests that check that miles to km (kn to mi i es (mi ) ) -mi . ? If you have any trouble with failing tests due to the nature of floating point compares, change your functions to return a rounded result, using round (resnlt,2). This should then allow your tests to pass. L5-3] (intcheck. py) Write a complete Python program that defines and calls a mainO function with the following behavior: Read an integer (int) num from the user, then print out "Greater than zero" if num > 0, "Less than zero" if numExplanation / Answer
question number 3:
def main:
x=input("Enter integer")
x=int(x)
if x>0:
print("Greater than zero")
elif x<0:
printf("less than zero")
else
printf("Equals to zero")
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.