{"id":4987,"date":"2019-10-18T18:19:17","date_gmt":"2019-10-18T07:19:17","guid":{"rendered":"https:\/\/casestudyhelp.com\/sample-questions\/?p=4987"},"modified":"2019-10-18T18:19:17","modified_gmt":"2019-10-18T07:19:17","slug":"ict112-doc-style-basic-guide-for-documentation-and-coding-style-in-2019","status":"publish","type":"post","link":"https:\/\/casestudyhelp.com\/sample-questions\/ict112-doc-style-basic-guide-for-documentation-and-coding-style-in-2019\/","title":{"rendered":"ICT112 Doc Style: Basic Guide for Documentation and Coding Style in 2019"},"content":{"rendered":"<blockquote>\n<p style=\"text-align: justify;\">Are You Looking for ICT112 Doc Style for Documentation and Coding Style in 2019? This is a basic guide for documentation and coding style for ICT112 2019, note that it is based on the Official Python Style. Get <a title=\"case study answers\" href=\"https:\/\/casestudyhelp.com\/blog\/sample-case-study-questions-and-answers\/\" target=\"_blank\"><strong>case study answers<\/strong><\/a> to questions in <a title=\"ICT112 Pythong Programming Assignment Help\" href=\"https:\/\/casestudyhelp.com\/sample-questions\/ict112-pythong-programming-assignment-help\/\" target=\"_blank\"><strong>ICT112 Pythong Programming Assignment Help<\/strong><\/a>, ICT112 Doc Style or Code Style from <a title=\"programming experts\" href=\"https:\/\/casestudyhelp.com\/programming-help\/\" target=\"_blank\"><strong>programming experts<\/strong><\/a> online in Australia, UK and USA.<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><a title=\"Order Now Today!\" href=\"https:\/\/casestudyhelp.com\/MyOrder.php\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-4945\" src=\"https:\/\/casestudyhelp.com\/sample-questions\/wp-content\/uploads\/2019\/10\/Order-now1.png\" alt=\"Order-now\" width=\"552\" height=\"87\" srcset=\"https:\/\/casestudyhelp.com\/sample-questions\/wp-content\/uploads\/2019\/10\/Order-now1.png 552w, https:\/\/casestudyhelp.com\/sample-questions\/wp-content\/uploads\/2019\/10\/Order-now1-300x47.png 300w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/a><\/p>\n<h2><strong>ICT112 Code Style<\/strong><\/h2>\n<p style=\"text-align: justify;\">This is a basic guide for documentation and coding style for ICT112 2019, note that it is based on the Official Python Style: PEP8 (<span style=\"text-decoration: underline;\">https:\/\/pep8.org\/#naming-<\/span> <span style=\"text-decoration: underline;\">conventions<\/span>) modified to include Hungarian notation to assist beginner programmers to conceptualize scope and types. For more information on Hungarian notation see <span style=\"text-decoration: underline;\">http:\/\/codevba.com\/help\/VB_naming_conventions.htm#.XJMDSFMzZTY<\/span><\/p>\n<p style=\"text-align: justify;\">Outside of the variable naming (which is as above), a good references are: <span style=\"text-decoration: underline;\">https:\/\/realpython.com\/python-pep8\/<\/span> and <span style=\"text-decoration: underline;\">https:\/\/realpython.com\/documenting-<\/span> <span style=\"text-decoration: underline;\">python-code\/<\/span><\/p>\n<h2><strong>NAMING<\/strong><\/h2>\n<ul>\n<li>Useful names are:\n<ul>\n<li>Descriptive<\/li>\n<li>Not too long<\/li>\n<li>Not \u201cSTEVE!\u201d<\/li>\n<\/ul>\n<\/li>\n<li>Package names: alllowercase<\/li>\n<li>Module names: alllowercase or all_lower_case<\/li>\n<li>Class names: CapName (sometimes called CamelCase)<\/li>\n<li>Function names: words_separated_by_an_underscore<\/li>\n<li>Variable names: also words_separated_by_an_underscore<\/li>\n<\/ul>\n<h2><strong>SCOPE<\/strong><\/h2>\n<ul>\n<li>Internal\/non-public: _variable_name or _function_name<\/li>\n<li>Intended variable Scope:\n<ul>\n<li>Class level: _cls_var<\/li>\n<li>Module level: _mod_var<\/li>\n<li>Global g_global_var<\/li>\n<\/ul>\n<\/li>\n<li>Constants: g_c_type_GLOBAL_CONSTANT or m_c_type_MODULE_CONSTANT<\/li>\n<\/ul>\n<ul>\n<li>Types are important<em>: (Not standard Python Style but helps readability)<\/em>\n<ul>\n<li>Integer: int_number_var<\/li>\n<li>Decimal\/Double: dbl_decimal_var<\/li>\n<li>String: str_string_var<\/li>\n<li>List: lst_list_var<\/li>\n<li>Dictionary: dict_dictionary_var<\/li>\n<li>File: file_file_var<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><strong>COMMENTS<\/strong><\/h2>\n<p>All files must have comments at the start of the file, above every module\/class, above every method, and throughout code as needed for clarity. These comments conform to standard PEP8 &#8211; <span style=\"text-decoration: underline;\">https:\/\/realpython.com\/python-pep8\/<\/span><\/p>\n<h3><strong>File comments:<\/strong><\/h3>\n<ul>\n<li>Must name file, author, and purpose of\u00a0file.<\/li>\n<li>If file is executable, must include example\u00a0usage.<\/li>\n<\/ul>\n<p><strong>For example:<\/strong><\/p>\n<p><span style=\"text-decoration: underline;\">\u00a0\u00a0<\/span>author<span style=\"text-decoration: underline;\">\u00a0 \u00a0<\/span>= &#8220;Erica Mealy, Mark Utting, and Adriano da Silva Marinho&#8221;<\/p>\n<p><span style=\"text-decoration: underline;\">\u00a0\u00a0<\/span>version<span style=\"text-decoration: underline;\">\u00a0 \u00a0<\/span>= &#8220;0.0.1&#8221;<\/p>\n<p><span style=\"text-decoration: underline;\">\u00a0\u00a0<\/span>email = &#8220;emm042@student.usc.edu.au&#8221;<\/p>\n<p><strong><em>&#8220;&#8221;&#8221;Example style docstrings.<\/em><\/strong><\/p>\n<ul>\n<li style=\"text-align: justify;\"><em>This module demonstrates documentation. Docstrings may extend over multiple lines Sections are created with a section header and a colon followed by a block of indented text.<\/em><\/li>\n<\/ul>\n<p><strong><em>Example:<\/em><\/strong><\/p>\n<ul>\n<li style=\"text-align: justify;\"><em>Examples can be given using either the &#8220;Example&#8220; or &#8220;Examples&#8220; sections. Sections support any reStructuredText formatting, including literal blocks::<\/em><\/li>\n<\/ul>\n<p><em>$ python example_google.py <\/em><\/p>\n<p><strong><em>Attributes:<\/em><\/strong><\/p>\n<ul>\n<li style=\"text-align: justify;\"><em>module_level_variable1 (int): Module level variables may be documented\u00a0<\/em><em>in either the &#8220;Attributes&#8220; section of the module docstring, or in an inline docstring immediately following the variable.<\/em><\/li>\n<\/ul>\n<p><em>&#8220;&#8221;&#8221;<\/em><\/p>\n<h2><strong>Function comments<\/strong><\/h2>\n<p style=\"text-align: justify;\">Every function should have a comment that succinctly explains what it does, the parameter\/s it expects (including type) and the return value.<\/p>\n<p><strong>For example:<\/strong><\/p>\n<p><strong>def <\/strong>ball_height(vel0, time): &#8220;&#8221;&#8221;Calculates the height of a ball.<\/p>\n<p>:param vel0: upward initial speed (metres\/sec)<\/p>\n<p>:param time: current time in seconds.<\/p>\n<p>:returns: the height of the ball in metres. &#8220;&#8221;&#8221;<\/p>\n<p>up = vel0*time<\/p>\n<p>down = 0.5 * 9.8 * time**2<\/p>\n<p><strong>return <\/strong>up \u2013 down<\/p>\n<h2><strong>GENERAL FORMATTING<\/strong><\/h2>\n<ul>\n<li style=\"text-align: justify;\">Indentation is important \u2013 ensure you indenting is correct, especially for if\/else statements where the else is a number of lines below the if statement.<\/li>\n<\/ul>\n<ul>\n<li>Lines should be kept to a reasonable length \u2013 PEP8 says 80 characters wide\n<ul>\n<li>Continue lines sensibly see <span style=\"text-decoration: underline;\">https:\/\/realpython.com\/python- pep8\/#maximum-line-length-and-line-breaking<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Use spaces <span style=\"text-decoration: underline;\">NOT<\/span> tabs (note that Jupyter will change uses of the tab key INTO spaces for you)<\/li>\n<\/ul>\n<ul>\n<li>Include spaces around binary operators \u2013 e.g. 1 + 2, <span style=\"text-decoration: underline;\">NOT<\/span> 1+2<\/li>\n<\/ul>\n<ul>\n<li><span style=\"text-decoration: underline;\">Don\u2019t<\/span> include space before OR after :,(,[, \u2013 e.g.\n<ul>\n<li><strong>def fn_name(param):<\/strong>\n<ul>\n<li><span style=\"text-decoration: underline;\">NOT<\/span> def fn_name(param) :<\/li>\n<li><span style=\"text-decoration: underline;\">NOT<\/span> def fn_name (param):<\/li>\n<li><span style=\"text-decoration: underline;\">NOT<\/span> def fn_name( param ):<\/li>\n<\/ul>\n<\/li>\n<li><strong>list [3]<\/strong>\n<ul>\n<li><span style=\"text-decoration: underline;\">NOT<\/span> list [3]<\/li>\n<li><span style=\"text-decoration: underline;\">NOT<\/span> list[ 3 ]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul>\n<li>Use Vertical white space (aka line breaks) to help separate classes and functions from other\u00a0code.<\/li>\n<li style=\"text-align: justify;\">Never use l (lower case L), O (capital o) or I (capital i) as variable names as they can easily be mistaken for 1s and 0s<\/li>\n<\/ul>\n<script type=\"text\/javascript\" charset=\"utf-8\" src=\"http:\/\/w.sharethis.com\/widget\/?wp=6.2.9\"><\/script>","protected":false},"excerpt":{"rendered":"<p>Are You Looking for ICT112 Doc Style for Documentation and Coding Style in 2019? This is a basic guide for documentation and coding style for ICT112 2019, note that it is based on the Official Python Style. Get case study answers to questions in ICT112 Pythong Programming Assignment Help, ICT112 Doc Style or Code Style [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[751],"tags":[2661,2667,2666,2669,2663,2665,2662,2668,2664,2659,2049],"_links":{"self":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/4987"}],"collection":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/comments?post=4987"}],"version-history":[{"count":1,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/4987\/revisions"}],"predecessor-version":[{"id":4988,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/posts\/4987\/revisions\/4988"}],"wp:attachment":[{"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/media?parent=4987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/categories?post=4987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/casestudyhelp.com\/sample-questions\/wp-json\/wp\/v2\/tags?post=4987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}