#return function 
def format_name(first_name, last_name):
  f_name = first_name.title()
  l_name = last_name.title()
  return f"{f_name} {l_name}"       #when return reaches then the complier terminate out of the function
  print("hi juli")                  #this line is not excute 
print(format_name("juli", "kumari"))


#Functions with Outputs
def format_name(f_name, l_name):
  if f_name == "" or l_name == "":
    return "You didn't provide valid inputs."
  formated_f_name = f_name.title()
  formated_l_name = l_name.title()
  f"Result: {formated_f_name} {formated_l_name}"

#Storing output in a variable
formatted_name = format_name(input("Your first name: "), input("Your last name: "))
print(formatted_name)
#or printing output directly
print(format_name(input("What is your first name? "), input("What is your last name? ")))

#Already used functions with outputs.
length = len(formatted_name)

#Return as an early exit
def format_name(f_name, l_name):
  """Take a first and last name and format it 
  to return the title case version of the name."""     #docstring (documentation)
  if f_name == "" or l_name == "":
    return "You didn't provide valid inputs."
  formated_f_name = f_name.title()
  formated_l_name = l_name.title()
  return f"Result: {formated_f_name} {formated_l_name}"


#day in months using return function
def is_leap(year):
  if year % 4 == 0:
    if year % 100 == 0:
      if year % 400 == 0:
        return True
      else:
        return False
    else:
      return True
  else:
    return False

def days_in_month():
  month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]  
  if is_leap(year) and month == 2:
    return 29
  return month_days[month-1]

  

year = int(input("Enter a year: "))
month = int(input("Enter a month: "))
days = days_in_month(year, month)
print(days)













732f553f4bfb8c61d4c5c67ab6de7b22589c126d
def format_name(first_name, last_name):
    f_name = first_name.title()
    l_name = last_name.title()
    return f'{f_name} {l_name}'
    print('hi juli')


<mask token>


def format_name(f_name, l_name):
    """Take a first and last name and format it 
  to return the title case version of the name."""
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    return f'Result: {formated_f_name} {formated_l_name}'


def is_leap(year):
    if year % 4 == 0:
        if year % 100 == 0:
            if year % 400 == 0:
                return True
            else:
                return False
        else:
            return True
    else:
        return False


<mask token>

def format_name(first_name, last_name):
    f_name = first_name.title()
    l_name = last_name.title()
    return f'{f_name} {l_name}'
    print('hi juli')


<mask token>


def format_name(f_name, l_name):
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    f"""Result: {formated_f_name} {formated_l_name}"""


<mask token>


def format_name(f_name, l_name):
    """Take a first and last name and format it 
  to return the title case version of the name."""
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    return f'Result: {formated_f_name} {formated_l_name}'


def is_leap(year):
    if year % 4 == 0:
        if year % 100 == 0:
            if year % 400 == 0:
                return True
            else:
                return False
        else:
            return True
    else:
        return False


<mask token>

def format_name(first_name, last_name):
    f_name = first_name.title()
    l_name = last_name.title()
    return f'{f_name} {l_name}'
    print('hi juli')


<mask token>


def format_name(f_name, l_name):
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    f"""Result: {formated_f_name} {formated_l_name}"""


<mask token>


def format_name(f_name, l_name):
    """Take a first and last name and format it 
  to return the title case version of the name."""
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    return f'Result: {formated_f_name} {formated_l_name}'


def is_leap(year):
    if year % 4 == 0:
        if year % 100 == 0:
            if year % 400 == 0:
                return True
            else:
                return False
        else:
            return True
    else:
        return False


def days_in_month():
    month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    if is_leap(year) and month == 2:
        return 29
    return month_days[month - 1]


<mask token>

def format_name(first_name, last_name):
    f_name = first_name.title()
    l_name = last_name.title()
    return f'{f_name} {l_name}'
    print('hi juli')


print(format_name('juli', 'kumari'))


def format_name(f_name, l_name):
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    f"""Result: {formated_f_name} {formated_l_name}"""


<mask token>
print(formatted_name)
print(format_name(input('What is your first name? '), input(
    'What is your last name? ')))
<mask token>


def format_name(f_name, l_name):
    """Take a first and last name and format it 
  to return the title case version of the name."""
    if f_name == '' or l_name == '':
        return "You didn't provide valid inputs."
    formated_f_name = f_name.title()
    formated_l_name = l_name.title()
    return f'Result: {formated_f_name} {formated_l_name}'


def is_leap(year):
    if year % 4 == 0:
        if year % 100 == 0:
            if year % 400 == 0:
                return True
            else:
                return False
        else:
            return True
    else:
        return False


def days_in_month():
    month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
    if is_leap(year) and month == 2:
        return 29
    return month_days[month - 1]


<mask token>
print(days)

#return function 
def format_name(first_name, last_name):
  f_name = first_name.title()
  l_name = last_name.title()
  return f"{f_name} {l_name}"       #when return reaches then the complier terminate out of the function
  print("hi juli")                  #this line is not excute 
print(format_name("juli", "kumari"))


#Functions with Outputs
def format_name(f_name, l_name):
  if f_name == "" or l_name == "":
    return "You didn't provide valid inputs."
  formated_f_name = f_name.title()
  formated_l_name = l_name.title()
  f"Result: {formated_f_name} {formated_l_name}"

#Storing output in a variable
formatted_name = format_name(input("Your first name: "), input("Your last name: "))
print(formatted_name)
#or printing output directly
print(format_name(input("What is your first name? "), input("What is your last name? ")))

#Already used functions with outputs.
length = len(formatted_name)

#Return as an early exit
def format_name(f_name, l_name):
  """Take a first and last name and format it 
  to return the title case version of the name."""     #docstring (documentation)
  if f_name == "" or l_name == "":
    return "You didn't provide valid inputs."
  formated_f_name = f_name.title()
  formated_l_name = l_name.title()
  return f"Result: {formated_f_name} {formated_l_name}"


#day in months using return function
def is_leap(year):
  if year % 4 == 0:
    if year % 100 == 0:
      if year % 400 == 0:
        return True
      else:
        return False
    else:
      return True
  else:
    return False

def days_in_month():
  month_days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]  
  if is_leap(year) and month == 2:
    return 29
  return month_days[month-1]

  

year = int(input("Enter a year: "))
month = int(input("Enter a month: "))
days = days_in_month(year, month)
print(days)












