Answer:
- def cubit2inch(c):
- inches = c * 18
- print(inches)
-
- cubit = int(input("Enter number of cubits: "))
- cubit2inch(cubit)
Step-by-step explanation:
The solution code is written in Python 3.
Firstly, write a function cubit2inch that takes one input parameter, c. In the function, apply the formula to convert the cubit to inches and print it (Line 2 - 3).
In the main program, we prompt user to input number of cubits and convert it to numerical and assign it to cubit variable (Line 5). Call the function to print the converted inches (Line 6).