Computer Learning

All About Computer And Technology

  • Home
  • Python Programming
    • How To Find Maximum And Minimum Value On Python Programming Language
    • Creating Tuple, List, and Dictionary on Python Programming Language
    • Learning about Input value using Python easily
    • Creating Function on Python Programming Language
    • Read More >>
  • Komputer
    • Program Execution (Organization and Architecture Computer)
    • Microcontroller of Von Neumann vs Havard and CISC vs RISC
    • Definition and Function of Control Unit
  • Blog Tutorial
    • How to Make Table of Content with Sroll in Blogspot
    • How to make Claim or Get Verification Our Blogs to Alexa
  • Tips dan Trik
    • How To Solve Red Cross In Blackberry
    • How to Restore Deleted File in Smartphone Memory Using Recuva
    • Selengkanya >>
  • Contact Me
Home » Python Programming Language » Creating Function on Python Programming Language

Creating Function on Python Programming Language

Joni
1 Comment
Python Programming Language
Thursday, July 24, 2014


Python let’s you create functions of your own. Function that you create will be used for the one problem. So, if there are two functions will be used two problems. If there are three functions will be used for three problems, and furthermore.
Creating your own functions offer you many advantages. One of them is that it allows you to break up your code , manage you code, and so on. By making functions, you can make formulas with your own name or others, it is up to you. I think many other advantages.
How to make function in Python ? How we create that ? See the formulas below.

def yourOwnName(var) :
    instructions
    return result


To understand more about this, I give you some examples below. Please read slowly and understand step by step :



See the other example below :


Explanations :

  • The example above, in sayGreeting function isn’t using return but using print (It is allowed by Python).
  • In circle function, you have to import pi = 3,14 from math modul.
  • In factorial function, it is recursive. What’s the meaning of recursive ? If you see the factorial function, there is instruction with name “factorial(n-1)”. The name of instruction is same with the name of function. So, we can conclude that it’ll be called when a function call instruction itself.

I think this topic is not difficult to understand, so you can improve your skill by using functions. You can create your own functions, and you can solve many problems with your own functions.I think enough for today, I will continue my writing about other topics. Thank you for your visiting to my blog, please comment in column below to improve my writing. OK ;)




Tweet
Creating Function on Python Programming Language Title : Creating Function on Python Programming Language
Description : Python let’s you create functions of your own. Function that you create will be used for the one problem. So, if there are two functions ...
Rating : 5

1 Response to "Creating Function on Python Programming Language"

mevin said...

Thank you for sharing the info. The blog helps understand for creation of funtions for baginners as well as intermediate programmer. The example shared was really helpful in learning. Thank you for sharing the info.

Regards
Python Training in Chennai

January 5, 2016 at 6:49 PM

Post a Comment

← Newer Post Older Post → Home
Subscribe to: Post Comments (Atom)

Popular Post

  • Program Execution (Organization and Architecture Computer)
    How to read this figure below ?  Notes  : Program Counter (PC) = Address of Instruction  Instruction Register (IR) = Ins...
  • How to Write Matematics Formulas on Python Programming Language
    Good night all programmers?  As my writing before about Learning if, for, and while function on Python Programming Language, I wil...
  • Microcontroller of Von Neumann vs Havard and CISC vs RISC
    Microcontroller of Von Neumann vs Havard and CISC vs RISC | pemprograman | komputer | bahasa python Microcontroll...
  • How to Use If, For, and While on Python Programming Language
    Welcome back to my page guys !    I’m happy to meet you again my friends because you all are the next generation on this country. We ...
  • How To Find Maximum And Minimum Value On Python Programming Language
    On my writing before, you have learned about tuple, list, and dictionary. You have to truly understand the topics before continuing to nex...
  • Contact Me On
    Contact Me on : e-mail : joni67676@gmail.com Facebook : John Twitter : @simplechilds Google + : Jhon Gu...
  • Creating Tuple, List, and Dictionary on Python Programming Language
    We have learned about Creating Function on Python Programming Language on my writing before. Now, we have to know how to collect a sequenc...
  • Definition and Function of Control Unit
    Definition and Function of Control Unit | pemprograman | komputer | bahasa python Control unit control CPU opera...

Label Cloud

  • Blog Tutorial
  • Komputer
  • Python Programming Language
  • Tips Trick

Blog

  • ▼  2014 (15)
    • November 2014 (1)
    • October 2014 (1)
    • September 2014 (3)
    • August 2014 (3)
    • July 2014 (7)

Followers

Mengenai Saya

Joni
View my complete profile
Back to top!
Copyright 2013 Computer Learning - All Rights Reserved Design by Mas Sugeng - Powered by Blogger