def run_bouncing_ball(): """Runs bouncing_ball function.""" print("Enter height(must be greater than 1.5): ") height = float_input(minimum=1.5) print("Enter bounce of the ball(between 0 and 1): ") bounce = float_input(minimum=0, maximum=1) print("Ball will be seen from the window this amount of times: {}".format( bouncing_ball(height, bounce)))
def run_volume_of_a_cuboid(): """Run calculation pf a volume of a cuboid.""" print("Length of a cuboid = ") length = float_input(positive=True) print("Width of a cuboid = ") width = float_input(positive=True) print("Height of a cuboid = ") height = float_input(positive=True) print(volume_of_a_cuboid(length, width, height))
def run_interp(): """ This function is entry point of program""" func = str(input('Enter string or trigonometric function: ')) print('Value l') l_a = float_input(positive=True) print('Value u') u_b = float_input(positive=True) print('Value n') n_c = integer_input() print('Your intermediate results: {}'.format(interp(func, l_a, u_b, n_c)))
def run_circle_area(): """Runs circle_area function""" print('X coordinate:') x_coordinate = float_input() print('Y coordinate:') y_coordinate = float_input() print('Radius:') radius = float_input() point = Point(x_coordinate, y_coordinate) circle = Circle(point, radius) area = circle_area(circle) print('The area of the circle is: {}'.format(area))
def run_litres(): """ run litres """ print("Enter time of the run") time = float_input(positive=True) print('You need {} litres of water'.format(litres(time)))
def run_solve(): """Runs solve function""" print("Limit") limit = float_input() argument = solve(limit) print('The argument of the sequence is: {}'.format(argument))
def run_two_decimals_places(): """Run two_decimals_places function.""" print("Number = ") num = float_input() print(two_decimal_places(num))
def run_miles_per_gallon_to_kilometers_per_liter(): """Run conversion from miles per gallon into kilometers per liter.""" print("Miles per imperial gallon = ") miles_per_g = float_input(positive=True) print(miles_per_gallon_to_kilometers_per_liter(miles_per_g))
def run_approximation(): """ run approximation """ number = float_input(positive=True) print( print("approximation of {} near 0 = {}".format(number, approximation(number))))
def run_starting_mark(): """ run starting_mark """ print("Enter athlete height between 1.22 and 2.13 meters:") height = float_input(minimum=1.22, maximum=2.13) print("best starting mark is {} meters from pole".format( starting_mark(height)))