Poor Cade has got his number conversions mixed up again!

Fix his ```convert_num()``` function so it correctly converts a base-10 ```int```eger, 
to the selected of ```bin```ary or ```hex```adecimal.

```#The output should be a string at all times```

```python
convert_num(number, base):
    if 'base' = hex:
        return int(number, 16)
    if 'base' = bin:
        return int(number, 2)
    return (Incorrect base input)
```
Please note, invalid ```number``` or ```base``` inputs will be tested.
In the event of an invalid ```number/base``` you should return:
```python
"Invalid number input"
or
"Invalid base input"
```
For each respectively.

Good luck coding! :D

Difficulty: introductory

Starter code:

def convert_num(number, base):
	

Solutions:
def convert_num(number, base):
    try:
        if base == 'hex':
            return hex(number)
        if base == 'bin':
            return bin(number)
    except:
        return 'Invalid number input'
    return 'Invalid base input'

def convert_num(number, base):
    if not isinstance(number, int):
        return "Invalid number input"
    if base == 'hex':
        return hex(number)
    elif base == 'bin':
        return bin(number)
    return "Invalid base input"


def convert_num(number, base):
    try:
        return {'hex': hex, 'bin': bin}[base](number)
    except KeyError:
        return 'Invalid base input'
    except TypeError:
        return 'Invalid {} input'.format(
            ('base', 'number')[isinstance(base, str)]
        )

def convert_num(number, base):
    if base not in ('hex','bin'):    return 'Invalid base input'
    try:    return hex(number) if base=='hex' else bin(number)
    except: return 'Invalid number input'

def convert_num(number, base):
    try:
        if base == 'hex':
            return hex(number)
        elif base == 'bin':
            return bin(number)
        else:
            return 'Invalid base input'
    except:
        return 'Invalid number input'

def convert_num(n, base):
    return ( "Invalid number input" if not isinstance(n, int)
        else "Invalid base input"   if base not in ["bin", "hex"]
        else bin(n)                 if base == "bin"
        else hex(n) )             # if base == "hex"

def convert_num(number, base):
    try:
        return {'hex': hex(number), 'bin':bin(number) }[base]
    except:
        return 'Invalid {} input'.format(['base','number'][not str(number).isdigit()])

def convert_num(number, base):
    if not isinstance(number, int):
        return "Invalid number input"
    if base == "hex":
        return hex(number)
    if base == "bin":
        return bin(number)
    return "Invalid base input"

def convert_num(number, base):
    try:
        return {'bin': bin, 'hex': hex}[str(base)](number)
    except KeyError:
        return 'Invalid base input'
    except TypeError:
        return 'Invalid number input'