{"id":3148,"date":"2021-04-20T17:03:16","date_gmt":"2021-04-20T11:33:16","guid":{"rendered":"https:\/\/python-programs.com\/?p=3148"},"modified":"2021-11-22T18:39:23","modified_gmt":"2021-11-22T13:09:23","slug":"python-programming-compound-statement-functions-argument","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/","title":{"rendered":"Python Programming \u2013 Compound statement Functions Argument"},"content":{"rendered":"

In this Page, We are Providing Python Programming \u2013 Compound statement Functions Argument. Students can visit for more Detail and Explanation of Python Handwritten Notes<\/a>\u00a0Pdf.<\/p>\n

Python Programming \u2013 Compound statement Functions Argument<\/h2>\n

Argument<\/strong><\/p>\n

The argument is the value passed to a function (or method) while calling the function. There are two types of arguments:<\/p>\n

Keyword argument<\/strong><\/p>\n

Keyword argument is an argument preceded by an identifier (e.g. name=) in a function call or passed as a value in a dictionary preceded by **. For example, 10, 20, 30, and 40 are keyword arguments in the following calls to summation ( ) function:<\/p>\n

>>> def summation( aa , bb , cc , dd ) : \r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print ' aa : ' , aa\r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print ' bb : ' , bb\r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print ' cc : ' , cc\r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print ' dd : ' , dd\r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 total=aa+bb+cc+dd\r\n. . .\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 return total\r\n. . .\r\n>>> sumupl=summation( bb=20 , dd=40 , aa=10 , cc=30 )\r\naa : 10\r\nbb : 20\r\ncc : 30\r\ndd : 40 \r\n>>> print ' Sum is: ' , sumupl \r\nSum is : 100\r\n>>> sumup2=summation(** { ' bb ' : 20 , ' dd ' : 40 , ' aa ' : 10 , ' cc ' : 30 } ) \r\naa : 10\r\nbb : 20\u00a0\r\ncc : 30\r\ndd : 4 0\r\n>>> print 'Sum is:',sumup2 \r\nSum is: 100<\/pre>\n

Positional argument<\/strong><\/p>\n

Positional argument is an argument that is not a keyword argument. Positional arguments can appear at the beginning of an argument list and can also be passed as elements of an iterable preceded by *. For example, 10, 20, 30 and 40 are positional arguments in the following calls to summation ( ) function:<\/p>\n

>>> def summation ( aa , bb , cc , dd ): \r\n. . .           print ' aa : ' , aa\r\n. . .           print ' bb : ' , bb\r\n. . .           print ' cc : ' , cc\r\n. . .           print ' dd  : ', dd\r\n. . .           total=aa+bb+cc+dd\r\n. . .           return total\r\n>>> sumup3=summation( 10 , 20 , 30 , 40 )\r\naa : 10\r\nbb : 20\r\ncc : 30\r\ndd : 40\r\n>>> print 'Sum is:',sumup3 \r\nSum is : 100\r\n>>> sumup4=summation( * ( 10 , 20 , 30 , 40 ) )\r\naa : 10\r\nbb : 20\r\ncc : 30\r\ndd : 40\r\n>>> print ' Sum is :  ',sumup4 \r\nSum is : 100<\/pre>\n","protected":false},"excerpt":{"rendered":"

In this Page, We are Providing Python Programming \u2013 Compound statement Functions Argument. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Compound statement Functions Argument Argument The argument is the value passed to a function (or method) while calling the function. There are two types of arguments: Keyword …<\/p>\n

Python Programming \u2013 Compound statement Functions Argument<\/span> Read More »<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5],"tags":[],"yoast_head":"\nPython Programming \u2013 Compound statement Functions Argument - Python Programs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Programming \u2013 Compound statement Functions Argument - Python Programs\" \/>\n<meta property=\"og:description\" content=\"In this Page, We are Providing Python Programming \u2013 Compound statement Functions Argument. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Compound statement Functions Argument Argument The argument is the value passed to a function (or method) while calling the function. There are two types of arguments: Keyword … Python Programming \u2013 Compound statement Functions Argument Read More »\" \/>\n<meta property=\"og:url\" content=\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/\" \/>\n<meta property=\"og:site_name\" content=\"Python Programs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/btechgeeks\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-20T11:33:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-11-22T13:09:23+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@btech_geeks\" \/>\n<meta name=\"twitter:site\" content=\"@btech_geeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasanna\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/python-programs.com\/#organization\",\"name\":\"BTech Geeks\",\"url\":\"https:\/\/python-programs.com\/\",\"sameAs\":[\"https:\/\/www.instagram.com\/btechgeeks\/\",\"https:\/\/www.linkedin.com\/in\/btechgeeks\",\"https:\/\/in.pinterest.com\/btechgeek\/\",\"https:\/\/www.youtube.com\/channel\/UC9MlCqdJ3lKqz2p5114SDIg\",\"https:\/\/www.facebook.com\/btechgeeks\",\"https:\/\/twitter.com\/btech_geeks\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png\",\"contentUrl\":\"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png\",\"width\":350,\"height\":70,\"caption\":\"BTech Geeks\"},\"image\":{\"@id\":\"https:\/\/python-programs.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/python-programs.com\/#website\",\"url\":\"https:\/\/python-programs.com\/\",\"name\":\"Python Programs\",\"description\":\"Python Programs with Examples, How To Guides on Python\",\"publisher\":{\"@id\":\"https:\/\/python-programs.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/python-programs.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage\",\"url\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/\",\"name\":\"Python Programming \u2013 Compound statement Functions Argument - Python Programs\",\"isPartOf\":{\"@id\":\"https:\/\/python-programs.com\/#website\"},\"datePublished\":\"2021-04-20T11:33:16+00:00\",\"dateModified\":\"2021-11-22T13:09:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/python-programs.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Programming \u2013 Compound statement Functions Argument\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage\"},\"author\":{\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb\"},\"headline\":\"Python Programming \u2013 Compound statement Functions Argument\",\"datePublished\":\"2021-04-20T11:33:16+00:00\",\"dateModified\":\"2021-11-22T13:09:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage\"},\"wordCount\":149,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/python-programs.com\/#organization\"},\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb\",\"name\":\"Prasanna\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/python-programs.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g\",\"caption\":\"Prasanna\"},\"url\":\"https:\/\/python-programs.com\/author\/prasanna\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Programming \u2013 Compound statement Functions Argument - Python Programs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/","og_locale":"en_US","og_type":"article","og_title":"Python Programming \u2013 Compound statement Functions Argument - Python Programs","og_description":"In this Page, We are Providing Python Programming \u2013 Compound statement Functions Argument. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming \u2013 Compound statement Functions Argument Argument The argument is the value passed to a function (or method) while calling the function. There are two types of arguments: Keyword … Python Programming \u2013 Compound statement Functions Argument Read More »","og_url":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/","og_site_name":"Python Programs","article_publisher":"https:\/\/www.facebook.com\/btechgeeks","article_published_time":"2021-04-20T11:33:16+00:00","article_modified_time":"2021-11-22T13:09:23+00:00","twitter_card":"summary_large_image","twitter_creator":"@btech_geeks","twitter_site":"@btech_geeks","twitter_misc":{"Written by":"Prasanna","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/python-programs.com\/#organization","name":"BTech Geeks","url":"https:\/\/python-programs.com\/","sameAs":["https:\/\/www.instagram.com\/btechgeeks\/","https:\/\/www.linkedin.com\/in\/btechgeeks","https:\/\/in.pinterest.com\/btechgeek\/","https:\/\/www.youtube.com\/channel\/UC9MlCqdJ3lKqz2p5114SDIg","https:\/\/www.facebook.com\/btechgeeks","https:\/\/twitter.com\/btech_geeks"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/python-programs.com\/#\/schema\/logo\/image\/","url":"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png","contentUrl":"https:\/\/python-programs.com\/wp-content\/uploads\/2020\/11\/BTechGeeks.png","width":350,"height":70,"caption":"BTech Geeks"},"image":{"@id":"https:\/\/python-programs.com\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/python-programs.com\/#website","url":"https:\/\/python-programs.com\/","name":"Python Programs","description":"Python Programs with Examples, How To Guides on Python","publisher":{"@id":"https:\/\/python-programs.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/python-programs.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage","url":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/","name":"Python Programming \u2013 Compound statement Functions Argument - Python Programs","isPartOf":{"@id":"https:\/\/python-programs.com\/#website"},"datePublished":"2021-04-20T11:33:16+00:00","dateModified":"2021-11-22T13:09:23+00:00","breadcrumb":{"@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/python-programs.com\/"},{"@type":"ListItem","position":2,"name":"Python Programming \u2013 Compound statement Functions Argument"}]},{"@type":"Article","@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#article","isPartOf":{"@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage"},"author":{"@id":"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb"},"headline":"Python Programming \u2013 Compound statement Functions Argument","datePublished":"2021-04-20T11:33:16+00:00","dateModified":"2021-11-22T13:09:23+00:00","mainEntityOfPage":{"@id":"https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#webpage"},"wordCount":149,"commentCount":0,"publisher":{"@id":"https:\/\/python-programs.com\/#organization"},"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/python-programs.com\/python-programming-compound-statement-functions-argument\/#respond"]}]},{"@type":"Person","@id":"https:\/\/python-programs.com\/#\/schema\/person\/ea8ce699662f0d7e248e52fe080b85bb","name":"Prasanna","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/python-programs.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/174540ad43736c7d1a4c4f83c775e74d?s=96&d=mm&r=g","caption":"Prasanna"},"url":"https:\/\/python-programs.com\/author\/prasanna\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3148"}],"collection":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/comments?post=3148"}],"version-history":[{"count":4,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3148\/revisions"}],"predecessor-version":[{"id":3156,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/posts\/3148\/revisions\/3156"}],"wp:attachment":[{"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/media?parent=3148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/categories?post=3148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-programs.com\/wp-json\/wp\/v2\/tags?post=3148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}