Return Multiple values from a Function |Multiple return Statements| Python for Beginners #lec74

preview_player
Показать описание
In this lecture we will learn:
- how to return multiple values from a function
- How to use multiple return statements in a function

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

#pythonforbeginners #python #functions #pythonprogramming #jennyslectures
Рекомендации по теме
Комментарии
Автор

*Input*
def format_name(fname, lname):
if fname=="" and lname=="":
return "Enter a valid name"
else:
return fname.title(), lname.title()

fname=input("Enter first name : ")
lname=input("Enter last name : ")
result=format_name(fname, lname)
print(result)

*output*

Enter first name :
Enter last name :
Enter a valid name

Enter first name : tom
Enter last name : JeRRY
('Tom', 'Jerry')

aishwaryagandhi
Автор

Mam your explanation is amazing. No one can teach like you, fan from A.p

shaheer_sheikh
Автор

def calling(a, b):
if first_name=="" and last_name=="":
return "please input your name"
else:
return first_name.title(), last_name.title()

first_name=input("Enter first your name ")
last_name=input("Enter last your name ")

result=calling(first_name, last_name)
print(result)

muneebbolo
Автор

great hard work of you ma'am and also give deep concept of every topic so please ma'am complete this python series as soon as possible thanks alot for every thing

waqarrajpt
Автор

def fun(f_name, l_name):
if f_name=="" and l_name=="":

return
else:

k=f_name.title()
j=l_name.title()
return(k, j)
a=input("enter a name")
b=input("enter a name")
print(fun(a, b))

anjalileo
Автор

Mam one lecture explain the all python syllabus and why to learn python basik and advance

newapdateranjayraj
Автор

def format_name(name, surname):
titlecased_name=name.title()

if name=="" and surname=="":
return
else :
return titlecased_name+ " "+titlecased_surname
f_name=input("Enter your first name:\n")
l_name=input("Enter your last name\n")
final=format_name(f_name, l_name)
print(final)

Calculatorworld
Автор

def show_name(first, last):
if first=="" and last=="":
return "Enter valid input"
else:
return first.title()+' '+last.title()

first=input("Enter first_name: ")
last=input("Enter Last_name: ")
print(show_name(first, last))

ManishaMick-kwpb
Автор

def format_name(f_name, l_name):

formatted_l_name = l_name.title()
return formatted_f_name, formatted_l_name
var1=input('enter the first name:')
var2=input('enter the second name:')
print(format_name(var1, var2))

anilbollepalli
Автор

def names(name1, name2):

if name1=="" and name2=="":
return 'please enter valid inputs '
else:
return f"{name1} {name2}"

first_name=input("Enter first name:")
last_name=input("Enter last name:")
add=names(first_name.capitalize(), last_name.capitalize())
print(add)

vishnumuraly
Автор

Thank you so much for this excellent work

benmatiko
Автор

def format_name(f_name):
if "jenny" == "honeY":
return "you have entered the wrong input."
else:

return(f"formatted_f_name")
print(format_name("jenny"))

K-Leelavardhan
Автор

name= input("Enter your name\n")
if name=="":
print("Please Enter a valid name")
else:
print(name.title())

adamyagogreen
Автор

def name(first_name, last_name):
if first_name == "" and last_name == "":
return "both the name are empty enter a valid name"
else:
return first_name.title() + " " + last_name.title()

first_name = input("enter first_name:")
last_name = input("enter last_name:")
res = name(first_name, last_name)
print(res)

azarudeena
Автор

def add(a, b):
if a=='' and b=='':
return
else:
t1=a.title()
t=b.title()
return f"{t1} {t}"
ch1=input('enter name:')
ch2=input('enter name:')
b=add(ch1, ch2)
print(b)

svstejasajja
Автор

Mam plz❤️continue core python and advanced python plz mam otherwise 😂😂😂😂😂😂😂😂plz mam start as early as possible plz mam

sravani
Автор

def names(name1, name2):
# if name1=="" and name2=="":
# return "you enterd a invalid name"
# else:
# return(name1.title(), name2.title())
# print(names((input('enter a name:')), (input('enter a name:'))))

white-hat
Автор

Mam plz continue core python also plz plz continue core and advanced python for our class students plz mam it's very useful to us

pullaashlesha
Автор

Madam please start object oriented programming in python, because I have doubt on some topic like decorator, generator, abc meta class, etc..

rishabhchatterjee
Автор

Mam what is the difference between this - return c and return (c)

VishalKumar-jjcv