You can print your name on a billboard ad. Find out how much it will cost you. Each letter has a default price of £30, but that can be different if you are given 2 parameters instead of 1.

You can not use multiplier "*" operator.

If your name would be Jeong-Ho Aristotelis, ad would cost £600.
20 leters * 30 = 600 (Space counts as a letter).

Difficulty: introductory

Starter code:

def billboard(name, price=30):
	

Solutions:
def billboard(name, price=30):
    return sum(price for letter in name)

def billboard(name, price = 30):
    return len(name) * price

def billboard(name, price = 30):
    return sum([price for l in name])

def billboard(name, price=30):
    return sum(price for _ in name)

def billboard(name, price=30):
    cout = 0
    for letters in name:
        cout += price
    return cout
    
    
    
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


billboard = lambda n, p=30: len(n) * p

def billboard(name, price=30):
    return len(name)*price #I'm lame

def billboard(name, price=30):
  
  # fine, dammit! I won't use that confounded * operator,
  # but you're paying the inefficiency costs...
  return sum(price for _ in name)

def billboard(name, price=30):
    return sum(price for c in name)
#    return len(name) * price


def billboard(name, price=30):
    return sum(price for c in name)

def billboard(name, price = 30):
    amt = len(name) / (1.0 / price)
    return amt

from operator import mul
def billboard(name, price=30):
    return mul(len(name), price)


def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    cost = 0
    for i in range(0, len(name)):
        cost += price
    return cost

def billboard(name, price=30):
    return int(len(name)/(1.0/price))

def billboard(name, price=30):
    return len(name) * price
    
    # I will use "*" whenever i want to :P


def billboard(name: str, price: int=30) -> int:
    """ Get a price for your name printed on the billboard. """
    return len(name) * price

def billboard(name, price=30):
    return sum([price for prince in range(len(name))])

def billboard(name, price = 30):
    cost = 0
    print(name)
    for i in range(len(name)):
        cost += price
    return cost
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


def billboard(name, price=30):
    a = 0
    for c in name:
        a += price
    return a

def billboard(name, price=30):
    l = [price for i in range(1,len(name)+1)]
    return sum(l)

def billboard(name, price = 30):
    new = 0
    for i in range(len(name)):
        new += price
    return new

def billboard(name, price=30):
    a = 0
    for i in name:
        a += price
    return a

def billboard(name, price = 30):
    total_price = 0
    for char in name:
        total_price += price
    return total_price


def billboard(name, price=30):
    suma=0
    s=len(name)
    for i in range(1, s+1):
        suma+=price
    return suma

def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    tot = 0
    for x in name:
        tot += price
        
    return tot

def billboard(name, price=30):
    return __import__('operator').mul(len(name), price)

def pro_recursive(n, m): 
    if n == 1: 
        return m
    else: 
        return m + pro_recursive(n-1, m)
        
def billboard(name, price=30): 
    return pro_recursive(len(name), price)

import functools 
def billboard(name, price = 30):
    print(name,price)
    return functools.reduce(lambda x,y : x + y , list(map(lambda x : price, list(range(len(name))))))

def billboard(name, price=30):
    if price == 30:
        result = 0
        for i in range(len(name)):
            result += 30
        return result
    else:
        result = 0
        for i in range(len(name)):
            result += price
        return result

def billboard(name, price=30):
    rv = 0
    for i in range(len(name)):
        rv += price
    else:
        return rv


def billboard(name, price=30):
    # Without using multiplication
    total = 0
    for char in name:
        total += price
        
    return total


def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    #for each character in name, add price once
    return sum(price for x in name)

def billboard(name, price=30):
    sum = 0
    for letter in name:
        sum = sum + price
        
    return sum

def billboard(name, price=30):
    print(name, price)
    return len(name) * price

def billboard(name, price=30):
    x = 0
    for i in range(len(name)):
        x = x + price
    return x

def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way
    return len(name) * price

def billboard(name, price=30):
    return len(name)*price
# you are lame


def billboard(name, price=30):
    return len(name) / (1/price)

def billboard(name, price=30):
    return sum([price for i in range(1, len(name)+1)])

def billboard(name, price=30):
    sum = 0   
    for char in name:
        sum +=price
        
    return sum

def billboard(name, price=30):
    return sum([price for x in name])


import numpy as np

def billboard(name, price=30):
    return np.dot(len(name), price)

def billboard(name, price=30):
    pri = 0
    for i in name:
        pri += price
    return pri
        
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


def billboard(name, price=30):
    sum=0
    for x in name:
        sum+=price
    return sum

def billboard(name, price=30):
    return sum(1*price for i in name)    

def billboard(n, p=30):
    return len(n)*p

def billboard(name, price=30):
    cost = 0
    for s in name:
        cost += price 
    return cost

def billboard(name, price=30):
    letters = 1
    new_price = 0
    while letters <= len(name):
        new_price = new_price + price
        letters = letters + 1
    return new_price
        
        


def billboard(name, price=30):
    x = 0
    for i in name:
        x += price
    return x

def billboard(name, price=30):
    output = 0
    for i in range(0,len(name)):
        output += price
    return output

def billboard(name: str, price: int = 30) -> int:
    return sum(price for _ in range(len(name)))


def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    a = 0
    for i in range(0,len(name)):
       a = a+price
    return a

billboard=lambda n,p=30:p*len(n)

def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    #return len(name)*price
    sum = 0
    for i in range(len(name)):
        sum += price
    return sum

def billboard(name, price=30):
    from operator import mul
    return list(map(mul, [len(name)], [price]))[0]

def billboard(name, price=30):
    
    """No multiplier operator."""
    
    myPrice = [price for char in name]
    
    return sum(myPrice)

def billboard(name, price=30):
    return sum(price for x in list(name))

def billboard(name, price=30):
    return sum([price for x in range(0, len(name))])

def billboard(name, price=30):
    total=0
    for each in range(len(name)):
        total+=price
    return total

def billboard(name, price=30):
    total = 0
    i = 0
    while i < len(name):
        total += price
        i += 1
    return total
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    return sum(price for i in range(len(name)))
    #or
    #return len(name)*price


# If you don't block it, I'm gonna use it
# If you block it, I'm gonna cheat it
def billboard(name, price=30):
    return len(name)*price

import numpy
def billboard(name, price=30):
    return numpy.prod([len(name), price])

def billboard(name, price=30):
    return eval('len(name)*price')

def billboard(name, price=30):
    return len(name).__mul__(price)

def billboard(name, price=30):
    print(('name:', name))
    return sum([price for x in name])
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


def billboard(name, price=30):
    p = 0
    for c in range(len(name)):
        p += price
    return p
    # Flez


def billboard(name, price=30):
    p = 0
    if price == 30:
        for c in range(len(name)):
            p += 30
        return p
    if price != 30:
        for c in range(len(name)):
            p += price
        return p
    # Flez


def billboard(name, price=30):
    total_price = 0
    for c in name:
        total_price += price
    return total_price

def billboard(name, price=30):
    r = 0
    for _ in name:
        r += price
    return r


def billboard(name, price=30):
    #your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!
    
  
    
    total = 0
    #for i in name:
     #   total += price 
    #return total
    
    return sum(total+price for _ in name)

def billboard(name, price=30):
    def s(a,b):
        return a*b
    return s(len(name),price)

def billboard(name, price=30):
  total = 0
  for i in range(1, len(name)+1):
      total += price
  return total

def billboard(name, price=30):
    cost = 0
    for letter in name:
        cost = cost + price
    return cost

def billboard(name, price=30):
    t=0
    for l in name:
        t+=price
    return t

from numpy import prod

def billboard(name, price=30):
    return prod([len(name),price])

def billboard(name, price=30):
    p = 0
    for i in range(len(name)):
        p += price
    return p

def billboard(name, price=30):
#     name = set(name)
    return len(name) * price

def billboard(name, price=30):
    r = 0
    for i in range(len(name)):
        r += price
    return r

def billboard(name, price=30):
    return sum([price for i in list(name)]) 

def billboard(name, price=30):
    q=0
    i=1
    while i<=len(name):
        q+=price
        i+=1
    return q#your code here - note that in Python we cannot prevent the use of the
    #multiplication, but try not to be lame and solve the kata in another way!


def billboard(name, price=30):
    return sum([price for c in range(len(name))])

def billboard(name, price=30):
    result = 0
    for letter in name:
      result+=price
    return result

def billboard(name, price=30):
    return sum(len(name) for _ in range(0, price))

from functools import reduce

billboard=lambda n, p=30: reduce(lambda a,b:a+p, n,0)

def billboard(name, price=30):
    # len(name) * price
    total = 0
    for x in name:
        if x: total += price
    return total

def billboard(name, price=30):
    name.replace(" ","")
    return len(name) * price

import operator

res = 0
def billboard(name, price=30):
#      return operator.mul(len(name), price)
     
     return sum([len(name) for i in range(price)])
     
#     res = len(name)
#     c = foo(res,name)
    
#     [c for i in range(price)]
#     return res
    
# def foo(res,name):
#         res += len(name)


def billboard(name, price=30):
    num = len(name)
    calc = 0
    count = 0
    while count < num:
       calc = calc + price
       count = count + 1
    return calc

def billboard(name, price = 30):
    i = 0
    x = 0
    b = len(name)
    while i < b:
        x= x + price
        i+=1
    return x

billboard = lambda name, price=30: sum(price for x in name)

def billboard(name, price=30):
    t = 0
    for i in range(len(name)):
        t += price
    return t

def billboard(name, price=30):
    total_price = 0
    for char in range(len(name)):
        total_price += price
    return total_price

def billboard(name, price=30):
    x = 0
    for i in [i for i in name]:
        x+=price
    return x

def billboard(name, price=30):
    builder = 0
    for x in name:
        builder = builder + price
    return builder

def billboard(name, price=30):
    amount=0
    for  _ in name:
        amount+=price
    return amount

def billboard(name, price=30):
    sum = 0
    for element in name:
        sum += price 
    return sum

billboard = lambda s, p = 30: sum(p for x in s)

def billboard(name, price=30):
    return len(name)/(1/float(price))


def billboard(name, price=30):
    a = len(name)
    cost = 0
    for i in range(1, a+1, 1):
        cost += price
    return cost