You start with a value in dollar form, e.g. $5.00. You must convert this value to a string in which the value is said, like '5 dollars' for example. This should account for ones, cents, zeroes, and negative values. Here are some examples:
```python
dollar_to_speech('$0.00') == '0 dollars.'
dollar_to_speech('$1.00') == '1 dollar.'
dollar_to_speech('$0.01') == '1 cent.'
dollar_to_speech('$5.00') == '5 dollars.'
dollar_to_speech('$20.18') == '20 dollars and 18 cents.'
dollar_to_speech('$-1.00') == 'No negative numbers are allowed!'
```
These examples account for pretty much everything. This kata has many specific outputs, so good luck!

Difficulty: introductory

Starter code:

def dollar_to_speech(value):
	

Solutions:
def dollar_to_speech(value):
    if "-" in value:
        return "No negative numbers are allowed!"
    d, c = (int(n) for n in value.replace("$", "").split("."))
    dollars = "{} dollar{}".format(str(d), "s" if d != 1 else "") if d or not c else ""
    link = " and " if (d and c) else ""
    cents = "{} cent{}".format(str(c), "s" if c != 1 else "") if c else ""
    return "{}{}{}.".format(dollars, link, cents)

def dollar_to_speech(s):
    d, c = map(int, s[1:].split("."))
    ds, cs = f"{d} dollar" + "s"*(d != 1), f"{c} cent" + "s"*(c != 1)
    return "No negative numbers are allowed!" if d < 0 else f"{ds}." if c == 0 else f"{cs}." if d == 0 else f"{ds} and {cs}."

def dollar_to_speech(value):
    if value[1] == "-":
        return "No negative numbers are allowed!"

    dot = value.index(".")
    dollars, cents = map(int, value[1:].split("."))
    end_d = "" if dollars == 1 else "s"
    end_c = "" if cents == 1 else "s"

    if dollars and cents:
        return "{} dollar{} and {} cent{}.".format(
            str(dollars), end_d, str(cents), end_c
        )
    elif cents and not dollars:
        return "{} cent{}.".format(str(cents), end_c)
    else:
        return "{} dollar{}.".format(str(dollars), end_d)

def dollar_to_speech(value):
    if value[1] == "-":
        return "No negative numbers are allowed!"
    if value == "$0.00":
        return "0 dollars."
    
    output = []
    dollars, cents = map(int, value[1:].split("."))
    
    if dollars:
        output.append("%s dollar%s" % (dollars, "s" * (dollars != 1)))
    if cents:
        output.append("%s cent%s" % (cents, "s" * (cents != 1)))
    
    return " and ".join(output) + "."

import re
def dollar_to_speech(val):
    if '-' in val: return 'No negative numbers are allowed!'
    c =  int(re.findall(r'\.(\d+)',val)[0])
    d = int(re.findall(r'\$(\d+)\.',val)[0])
    if d == 0 == c : return '0 dollars.'
    
    seg1 = '{} dollar{}'.format(d,('s' if d > 1 else '')) if d else ''
    seg2 = '{} cent{}'.format(c,  ('s' if c > 1 else '')) if c else ''
    seg3 = ' and ' if seg1 and seg2 else ''
    return ''.join([seg1,seg3,seg2,'.'])
    
    


def dollar_to_speech(value):
    x = value.lstrip('$')
    if float(x) < 0:
        return 'No negative numbers are allowed!'
    dollars, cents = map(int, x.split('.'))
    speech = []
    if cents:
        speech.append('{} cent{}'.format(cents, 's' if cents != 1 else ''))
    if dollars or not speech:
        speech.insert(0, '{} dollar{}'.format(dollars, 's' if dollars != 1 else ''))
    return ' and '.join(speech) + '.'

def dollar_to_speech(value):
  if '-' in value:
    return "No negative numbers are allowed!"
  else:
    a = value.replace('$',"").split('.')
    if int(a[0]) > 1 and int(a[1]) >1:
     return  '{} dollars and {} cents.'.format(int(a[0]), int(a[1]))
    elif int(a[0]) == 1 and int(a[1]) == 1:
      return  '{} dollar and {} cent.'.format(int(a[0]), int(a[1]))
    elif int(a[0]) < 1 and int(a[1]) < 1 or int(a[0]) > 1 and int(a[1]) < 1:
      return  '{} dollars.'.format(int(a[0]))
    elif int(a[0]) == 1 and int(a[1]) < 1:
      return  '{} dollar.'.format(int(a[0]))
    elif int(a[0]) > 1 and int(a[1]) ==1:
      return  '{} dollars and {} cent.'.format(int(a[0]), int(a[1]))
    elif int(a[0]) == 1 and int(a[1]) > 1:
      return  '{} dollar and {} cents.'.format(int(a[0]), int(a[1]))
    elif int(a[1]) > 1:
      return  '{} cents.'.format(int(a[1]))
    else:
      return  '{} cent.'.format(int(a[1]))

def dollar_to_speech(value):
    d, c = map(int, value[1:].split('.'))
    if d < 0:
        return 'No negative numbers are allowed!'
    if d == 0 == c:
        return '0 dollars.'
    s = ''
    if d > 0:
        s += '{} dollar{}{}'.format(d, 's' * (d > 1), ' and ' * (c > 0))
    if c > 0:
        s += '{} cent{}'.format(c, 's' * (c > 1))
    return s + '.'

def dollar_to_speech(value):
    if '-' in value: return 'No negative numbers are allowed!'
    
    vals = list(map(int, value.replace('$','').split('.')))
    typs = ('dollar', 'cent')
    
    return (' and '.join('{} {}'.format(v, t + 's'*(v!=1)) for v,t in zip(vals, typs) if v) or '0 dollars' )+'.'
    
DollarToSpeech = dollar_to_speech


def dollar_to_speech(value):
    pass
    
    if "-" in value:
    
        return 'No negative numbers are allowed!'
        
    else:
    
        d = int(value[1::].split('.')[0])
        
        c = int(value[1::].split('.')[1])
        
        if d==0 and c==0:
        
            return "0 dollars."
        
        if d==1 and c==0:
        
            return "{} dollar.".format(d)
        
        if d>1 and c==0:
        
            return "{} dollars.".format(d)
        
        if d==0 and c==1:
        
            return "{} cent.".format(c)
        
        if d==0 and c>1:
        
            return "{} cents.".format(c)
        
        if d==1:
        
            m = 'dollar'
            
        if d>1:
        
            m = 'dollars'
            
        if c==1:
        
            k = 'cent'
            
        if c>1:
        
            k = 'cents'
              
        if d>0 and c>0:
    
            return "{} {} and {} {}.".format(d,m,c,k)