Python Tutorial - 17 | Functions in Python | User defined Functions | Sinhala

preview_player
Показать описание
Python Tutorial - 17 | Functions in Python | User-defined Functions | Sinhala
----------------------------------------------
A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. A function can return data as a result.

▬▬▬▬▬▬ Want to learn more? 🚀 ▬▬▬▬▬▬

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬

#programming
#sinhala
#codeprolk
Рекомендации по теме
Комментарии
Автор

තියෙන්නෙ සුපිරි channel එකක් ❤️‍🔥❤️‍🔥❤️‍🔥

ai
Автор

Thank youu soo much..24 january al liynna me video eka blana mn..❤️😊

hansisewmini
Автор

Function gena terun gatta.. thank very much

sltechcity
Автор

bro oyata tokenizer ek expline and own toknizer video ekk genna barida deep lernong walata

ForgeLK
Автор

Write a python3 function sqr(n) that returns the square of its numeric parameter n.

chanindurandika
Автор

How to Modify the following code snippet to add two numbers.

For example:

Test Input Result
get_input() 12 Enter number one: 12
23 Enter number two: 23
35


def get_input():
# Only edit the code segment between the dashes

#

a = input("Enter number one: ")
b = input("Enter number two: ")

#

print (a+b)

dushmanthaperera
Автор

Variable oya wagemane, ewa gattanam lesi ne

Ramsey.
Автор

PLEASE CORECT THIS



#TODO: Write the functions for arithmatic operations here
#These functions should cover Task 2



#TODO: Write the select_op(choice) function here
#This function sould cover Task 1 (Section 2) and Task 3




#End the select_op(choice) function here

#This is the main loop. It covers Task 1 (Section 1)
#YOU DO NOT NEED TO CHANGE ANYTHING BELOW THIS LINE
while True:
print("Select operation.")
print("1.Add : + ")
print("2.Subtract : - ")
print("3.Multiply : * ")
print("4.Divide : / ")
print("5.Power : ^ ")
print("6.Remainder: % ")
print("7.Terminate: # ")
print("8.Reset : $ ")


# take input from the user
choice = input("Enter choice(+, -, *, /, ^, %, #, $): ")
print(choice)
if(select_op(choice) == -1):
#program ends here
print("Done. Terminating")
exit()

WonderKids
Автор

Return eka gatte aida kiyala terune na

Ramsey.
Автор

Odoo kiyala ekak dannawada. Eka gana video tikak genna barida. Oyage video okkoma balana gaman
Thank you sir.. ❣️

tharindumayuranga
Автор

Ayye select_op(choice) function kiyanne mokakda?

ranumathi
Автор

return eken wena de poddak kiyanawadda

rjhacker
Автор

Video eka hodai, godak hodata theruna.❤️.eth return funtion eka gena lokuwata therun ne

slheritage
Автор

patta ahh . eth bvn mewa passe amathaka wenone .. 😢ekata mookadda karanne bn ....

rjhacker
Автор

How to write a code to get the addition of two numbers which are input by the user
Eg:- x= int(input('Enter the 1st number'))
y= int(input('Enter the 2nd number'))

Then how to write the rest of codes ???

kenurasanvidu
Автор

django learn karanna monawada danagena innaoni python basic
(plz django gana video karannna ko plzz....)

prasangaprix
Автор

aiye api pinin argument ganne nthnm eka code dekak set kranna hadana ekak nm e varahana hisva thibunata kamak ndd

pasinduamarawansha