Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yes, it is possible to convert minutes to hours without using two times the variable. Here's one way to do it:

Let's say you have a variable minutes that you want to convert to hours. Instead of using minutes/60 to get the number of hours, you can use (1.0/60)*minutes.

For example:

minutes = 120
hours = (1.0/60)*minutes
print(hours) # Output: 2.0

This way, you only use the variable minutes once to get the number of hours.