Skip to content
Snippets Groups Projects
Select Git revision
  • ed3bca9db6632308c931bec7a33ecb74f654b867
  • master default protected
2 results

module2_functions.py

Blame
  • vand's avatar
    vand authored
    ed3bca9d
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    module2_functions.py 481 B
    
    
    def convert_time(hours, minutes):
        minutes_in_hour = 60
        mnt = hours * minutes_in_hour
        total = minutes + mnt
        return total
    
    #%%
    
    hours = 5
    minutes = 15
    converted = convert_time(hours,minutes)
    print(converted)
    
    #%% Instead of writing function from scratch, you should first implement the 
    # functionality, as in the code below. Then, you can pack it in the function. 
    
    hours = 5
    minutes = 15
    minutes_in_hour = 60
    mnt = hours * minutes_in_hour
    total = minutes + mnt