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

cs101.rb

Blame
  • 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