Learn Regular Expressions by Building a Password Generator - Step 1

Tell us what’s happening:

def add_time(start, duration):
return new_time
print(add_time(‘3:00 PM’, ‘3:10’)) # 6:10 PM
print(add_time(‘11:30 AM’, ‘2:32’, ‘Monday’)) # 2:02 PM, Monday
print(add_time(‘10:10 PM’, ‘3:30’)) # 1:40 AM (next day)
print(add_time(‘11:43 PM’, ‘24:20’, ‘tueSday’)) # 12:03 AM, Thursday (2 days later)
print(add_time(‘6:30 PM’, ‘205:12’)) # 7:42 AM (9 days later)
print(add_time(‘2:59 AM’, ‘24:00’, ‘saturDay’)) # 2:59 AM, Sunday (next day)

Your code so far


# User Editable Region

def add_time(start, duration):
        return new_time
            print(add_time('3:00 PM', '3:10'))                  # 6:10 PM
            print(add_time('11:30 AM', '2:32', 'Monday'))      # 2:02 PM, Monday
            print(add_time('10:10 PM', '3:30'))                # 1:40 AM (next day)
            print(add_time('11:43 PM', '24:20', 'tueSday'))    # 12:03 AM, Thursday (2 days later)
            print(add_time('6:30 PM', '205:12'))               # 7:42 AM (9 days later)
            print(add_time('2:59 AM', '24:00', 'saturDay'))   # 2:59 AM, Sunday (next day)
            print(add_time('11:59 PM', '24:05', 'Wednesday'))  # 12:04 AM, Friday (2 days later)
            print(add_time('8:16 PM', '466:02', 'tuesday'))    # 6:18 AM, Monday (20 days #later))

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36

Challenge Information:

Learn Regular Expressions by Building a Password Generator - Step 1

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

Are you sure you are on Step 1 of “Learn Regular Expressions by Building a Password Generator”?

Learn Regular Expressions by Building a Password Generator: Step 1 | freeCodeCamp.org

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.