Make a function that will return a greeting statement that uses an input; your program should return, `"Hello,  how are you doing today?"`.

SQL: return results in a column named ```greeting```

*[Make sure you type the exact thing I wrote or the program may not execute properly]*

Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code:
def greet(name):
	

Solutions:
def greet(name):
	return 'Hello, {} how are you doing today?'.format(name)


def greet(name):
	return f'Hello, {name} how are you doing today?'


def greet(name):
	return 'Hello, %s how are you doing today?' % name


greet = lambda name: 'Hello, %s how are you doing today?' % name


greet = lambda name: f'Hello, {name} how are you doing today?'


greet = 'Hello, {0} how are you doing today?'.format


import unittest

def greet(name):
	return 'Hello, {} how are you doing today?'.format(name)

class TestGreet(unittest.TestCase):

	def test_greet(self):
		name = 'Ryan'
		actual = greet(name)
		self.assertEqual(actual, 'Hello, Ryan how are you doing today?')


def greet(name):
	return 'Hello, %s how are you doing today?' % name
print(greet('Bob'))


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?' if name else None


def greet(name):
	a = 'Hello, {0} how are you doing today?'.format(name)
	return a


greet = lambda x: f'Hello, {x} how are you doing today?'


greet = lambda n: 'Hello, {} how are you doing today?'.format(n)


def greet(name):
	if name:
		return 'Hello, ' + name + ' how are you doing today?'
	else:
		return "Ask of me, and I shall give thee the heathen for thine inheritance,         and for thy possession, the ends of the earth.         Thou shalt break them with a rod of iron.         Thou shalt dash them in pieces, like a potters vessel.         Be wise now therefore, ye kings.         Be admonished, ye judges of the earth.        Serve the Lord with fear, and rejoice with trembling.         Kiss the son lest he be angry, and ye perish in the way, though His wrath be kindled but a little.         Hold your toung. The dead don't speak!        To the dead dare walk the earth before my eyes?        Will the undead raise an army, fall in, and advance? Would those who would abandon God and appraise the heretical order DARE presume to meet my gaze!?        Iscariot will not allow it. I will not allow it. You will be cut down like a straw, trembling before my wrath;         Amen!"


def greet(n):
	return 'Hello, ' + str(n) + ' how are you doing today?'


def greet(name):
	your_name = name
	return 'Hello, ' + your_name + ' how are you doing today?'
print(greet('Ryan'))


def greet(name):
	x = 'Hello,  how are you doing today?'
	return x[0:7] + name + x[7:]


def greet(name):
	a = 'Hello, '
	b = ' how are you doing today?'
	name_temp = a + name + b
	return name_temp


def greet(name):
	y = 'Hello, '
	z = ' how are you doing today?'
	final = y + name + z
	return final


def greet(name):
	my_str = 'Hello, ' + name + ' ' + 'how are you doing today?'
	return my_str


def greet(name):
	greetings = ['Hello,', 'how', 'are', 'you', 'doing', 'today?']
	greetings.insert(1, str(name))
	return lista_to_string(greetings)

def lista_to_string(L):
	return ' '.join((str(x) for x in L))


def greet(Name):
	return 'Hello, ' + Name + ' how are you doing today?'


def greet(name):
	welcome = 'Hello, ' + str(name) + ' how are you doing today?'
	return welcome


def greet(name):
	first = 'Hello, '
	last = ' how are you doing today?'
	full = first + name + last
	return full


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?'
greet('John')


def greet(name):
	result = 'Hello, %s how are you doing today?' % name
	return result
print(greet('Ryan'))


def greet(name):
	String = 'Hello, ' + name + ' how are you doing today?'
	return String


def greet(name):
	mystring = 'Hello, ' + name + ' how are you doing today?'
	return mystring


def greet(name):
	res_str = 'Hello, ' + name + ' how are you doing today?'
	return res_str


def greet(name):
	return 'Hello, ' + str(name) + ' how are you doing today?'
greet('Ryan')


def greet(name):
	txt = ' how are you doing today?'
	return 'Hello, ' + name + txt


def greet(name):
	script = 'Hello, ' + name + ' how are you doing today?'
	return script


def greet(name: str) -> str:
	if type(name) is str:
		return f'Hello, {name} how are you doing today?'
	else:
		print(f'{name} is not a string')


def greet(name: str) -> str:
	try:
		if type(name) is str:
			return f'Hello, {name} how are you doing today?'
	except TypeError:
		print(f'{name} is not a string')


def greet(name):
	A = 'Hello, '
	B = ' how are you doing today?'
	return A + name + B
print(greet('Tim'))


def greet(name):
	txt = 'Hello, {input} how are you doing today?'.format(input=name)
	return txt


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?'
greet('Rhett')


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?'
print(greet('kuki'))


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?'
greet('Ayush')


def greet(name):
	return 'Hello, ' + name + ' how are you doing today?'
greet('Kanyisa')


def greet(name=None):
	string_greeting = f'Hello, {name} how are you doing today?'
	if type(name) is str:
		return string_greeting
	else:
		return 'Name must be a string.'


def greet(name):
	x = f'Hello, {name} how are you doing today?'
	return x
print(greet('Ryan'))


def greet(name):
	alphabet = 'AaBbCcDdEeFfGgHhIiKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZzАаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя'
	symbols = ' 1234567890.,_-+='
	return 'Hello, ' + name + ' how are you doing today?'


def greet(username):
	a = 'Hello, ' + username + ' how are you doing today?'
	return a


def greet(name):
	stupid = 'Hello, ' + name + ' how are you doing today?'
	return stupid


def greet(name):
	retezec = 'Hello, ' + name + ' how are you doing today?'
	return retezec


def greet(x):
	x = str(x)
	y = str('Hello, ' + x + ' how are you doing today?')
	return y


def greet(name):
	x = name
	Y = 'Hello, ' + x + ' how are you doing today?'
	return Y


def greet(name):
	text = 'Hello, '
	text1 = ' how are you doing today?'
	return text + name + text1


def greet(name):
	result = 'Hello, ' + name + ' how are you doing today?'
	return result


def greet(samuel):
	return 'Hello, {} how are you doing today?'.format(samuel)


def greet(name):
	string = 'Hello, '
	string += str(name)
	string += ' how are you doing today?'
	return string


def greet(name):
	one = 'Hello, '
	two = ' how are you doing today?'
	return one + name + two


def greet(name):
	h = 'Hello, '
	s = ' how are you doing today?'
	a = h + name + s
	return a


def greet(name):
	return 'Hello, {} how are you doing today?'.format(name)

def main():
	name = greet('Ryan')

def __starting_point():
	main()
__starting_point()


from typing import *
greet: Callable[[str], str] = lambda name: f'Hello, {name} how are you doing today?'


def greet(name):
	final = 'Hello, ' + name + ' how are you doing today?'
	print(final)
	return final