{"appState":{"pageLoadApiCallsStatus":true},"categoryState":{"relatedCategories":{"headers":{"timestamp":"2024-05-02T20:01:05+00:00"},"categoryId":33592,"data":{"title":"Programming & Web Design","slug":"programming-web-design","image":{"src":null,"width":0,"height":0},"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592}],"parentCategory":{"categoryId":33512,"title":"Technology","slug":"technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"}},"childCategories":[{"categoryId":34511,"title":"Go Programming Language","slug":"go-programming-language","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34511"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":1,"bookCount":1},{"categoryId":33593,"title":"3D Printing","slug":"3d-printing","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33593"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":33,"bookCount":1},{"categoryId":33594,"title":"App Development","slug":"app-development","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33594"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":85,"bookCount":6},{"categoryId":33595,"title":"C","slug":"c","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33595"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":17,"bookCount":3},{"categoryId":33596,"title":"C#","slug":"csharp","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33596"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":29,"bookCount":4},{"categoryId":33597,"title":"C++","slug":"cplusplus","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33597"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":63,"bookCount":2},{"categoryId":33598,"title":"Cisco Programming","slug":"cisco-programming","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33598"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":false,"articleCount":1,"bookCount":0},{"categoryId":33599,"title":"Coding","slug":"coding","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33599"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":106,"bookCount":5},{"categoryId":33600,"title":"HTML","slug":"html","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33600"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":false,"articleCount":8,"bookCount":0},{"categoryId":33601,"title":"HTML5","slug":"html5","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33601"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":265,"bookCount":2},{"categoryId":33602,"title":"Java","slug":"java","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33602"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":122,"bookCount":6},{"categoryId":33603,"title":"JavaScript","slug":"javascript","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33603"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":87,"bookCount":5},{"categoryId":33604,"title":"MATLAB","slug":"matlab","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33604"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":83,"bookCount":1},{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":83,"bookCount":6},{"categoryId":33607,"title":"R","slug":"r","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33607"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":99,"bookCount":5},{"categoryId":33608,"title":"SQL","slug":"sql","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":26,"bookCount":3},{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":209,"bookCount":36},{"categoryId":34324,"title":"CSS3","slug":"css3","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34324"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":false,"articleCount":4,"bookCount":0},{"categoryId":34338,"title":"Web Hosting","slug":"web-hosting","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34338"},"image":{"src":"/img/background-image-2.fabfbd5c.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":6,"bookCount":1},{"categoryId":34376,"title":"Blogging & Website Platforms","slug":"blogging-website-platforms","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34376"},"image":{"src":"/img/background-image-1.daf74cf0.png","width":0,"height":0},"hasArticle":true,"hasBook":true,"articleCount":66,"bookCount":9}],"description":"Ever wonder what makes the software, websites, and blogs you use every day function properly (or improperly)? It's programming. Our articles reveal the ins and outs of programming and web design.","relatedArticles":{"self":"https://dummies-api.dummies.com/v2/articles?category=33592&offset=0&size=5"},"hasArticle":true,"hasBook":true,"articleCount":1395,"bookCount":99},"_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"}},"relatedCategoriesLoadedStatus":"success"},"listState":{"list":{"count":10,"total":1395,"items":[{"headers":{"creationTime":"2016-03-27T16:54:26+00:00","modifiedTime":"2024-04-12T17:36:17+00:00","timestamp":"2024-04-12T18:01:11+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"SQL","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"},"slug":"sql","categoryId":33608}],"title":"SQL All-in-One For Dummies Cheat Sheet","strippedTitle":"sql all-in-one for dummies cheat sheet","slug":"sql-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Get to know the basics of SQL development, including information on the set and value functions and using the WHERE clause.","noIndex":0,"noFollow":0},"content":"SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with WHERE clauses.","description":"SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with WHERE clauses.","blurb":"","authors":[{"authorId":9559,"name":"Allen G. Taylor","slug":"allen-g-taylor","description":" <p> <b>This All-in-One draws on the work of top authors in the <i>For Dummies </i>series who’ve created books designed to help data professionals do their work. The experts are Jack Hyman, Luca Massaron, Paul McFedries, John Paul Mueller, Lillian Pierson, Jonathan Reichental PhD, Joseph Schmuller PhD, Alan Simon, and Allen G. Taylor.</b> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9559"}},{"authorId":10600,"name":"Richard Blum","slug":"richard-blum","description":" <p><b>Richard Blum</b> has more than 30 years of experience as a systems administrator and programmer. He teaches online courses in PHP, JavaScript, HTML5, and CSS3 programming, and authored the latest edition of <i>Linux For Dummies</i>. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/10600"}}],"primaryCategoryTaxonomy":{"categoryId":33608,"title":"SQL","slug":"sql","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33608"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":188699,"title":"SQL Data Types","slug":"sql-data-types","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188699"}},{"articleId":188700,"title":"SQL Criteria for Normal Forms","slug":"sql-criteria-for-normal-forms","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188700"}}],"fromCategory":[{"articleId":260869,"title":"Using SQL Constraints Within Transactions","slug":"using-sql-constraints-within-transactions","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260869"}},{"articleId":260866,"title":"How to Use the SQL Union Join","slug":"how-to-use-the-sql-union-join","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260866"}},{"articleId":260727,"title":"How to Declare a SQL Cursor","slug":"how-to-declare-a-sql-cursor","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260727"}},{"articleId":260720,"title":"What is SQL?","slug":"what-is-sql","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260720"}},{"articleId":260678,"title":"ODBC: Interfacing with SQL Databases","slug":"odbc-interfacing-with-sql-databases","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/260678"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281870,"slug":"sql-all-in-one-for-dummies-3rd-edition","isbn":"9781119569619","categoryList":["technology","programming-web-design","sql"],"amazon":{"default":"https://www.amazon.com/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119569613-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119569613/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/sql-all-in-one-for-dummies-3rd-edition-cover-9781119569619-203x255.jpg","width":203,"height":255},"title":"SQL All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p><b data-author-id=\"9559\">Allen G. Taylor</b> is a 40-year veteran of the computer industry and the author of more than 40 books, including <i>SQL For Dummies</i> and <i>Database Development For Dummies</i>. For the latest news on Allen's activities, check out his online courses (at pioneer-academy1.teachable.com) and his blog (at www.allengtaylor.com). You can contact Allen at [email protected]. </p>","authors":[{"authorId":9559,"name":"Allen G. Taylor","slug":"allen-g-taylor","description":" <p> <b>This All-in-One draws on the work of top authors in the <i>For Dummies </i>series who’ve created books designed to help data professionals do their work. The experts are Jack Hyman, Luca Massaron, Paul McFedries, John Paul Mueller, Lillian Pierson, Jonathan Reichental PhD, Joseph Schmuller PhD, Alan Simon, and Allen G. Taylor.</b> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9559"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;sql&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119569619&quot;]}]\" id=\"du-slot-661976e795fc7\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;sql&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119569619&quot;]}]\" id=\"du-slot-661976e796599\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":188695,"title":"Phases of SQL System Development","slug":"phases-of-sql-system-development","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188695"}},{"articleId":188700,"title":"SQL Criteria for Normal Forms","slug":"sql-criteria-for-normal-forms","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188700"}},{"articleId":188699,"title":"SQL Data Types","slug":"sql-data-types","categoryList":["technology","programming-web-design","sql"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188699"}},{"articleId":188693,"title":"SQL Value Functions","slug":"sql-value-functions","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188693"}},{"articleId":188692,"title":"SQL Set Functions","slug":"sql-set-functions","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188692"}},{"articleId":188697,"title":"SQL WHERE Clause Predicates","slug":"sql-where-clause-predicates","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/188697"}}],"content":[{"title":"Phases of SQL system development","thumb":null,"image":null,"content":"<p>In developing any system, you start at the beginning and go through to the end, and it’s no different with SQL. The following list shows you what to consider at each phase of the SQL development life cycle:</p>\n<ul>\n<li><strong>Definition phase:</strong> Precisely define the problem to be solved, its magnitude, and who will work on it.</li>\n<li><strong>Requirements phase: </strong>Develop a detailed description of exactly what the development effort will produce. Gather all relevant information and put it into a requirements document (Statement of Requirements). Get client signoff.</li>\n<li><strong>Evaluation phase:</strong> Determine exactly how you will meet the requirements. What tools will you use? How will you deploy your development team? Determine whether the job is doable within time and budget constraints.</li>\n<li><strong>Design phase:</strong> Create a database model and then design a database and database application that satisfy the terms of the requirements document.</li>\n<li><strong>Implementation phase:</strong> Build the database and the database application. Include copious documentation within the code and in external documents.</li>\n<li><strong>Final documentation and testing phase:</strong> Give the database and application a tough workout. Hit the system with every conceivable input condition and a few inconceivable ones. Try to overload it. See where it breaks. When it breaks, send it back to the implementers or even back to the designers. Document everything.</li>\n<li><strong>Maintenance phase:</strong> Fix latent bugs as they arise. Provide updates and enhancements called for by the client.</li>\n</ul>\n"},{"title":"SQL criteria for normal forms","thumb":null,"image":null,"content":"<p>In SQL, normal forms are defining characteristics of relational databases. SQL forms get classified according to the types of modification anomalies they&#8217;re subject to. First, second, and third normal forms (1NF, 2NF, 3NF) serve as remedies to the three main sources of modification anomalies.</p>\n<p>The normal forms are nested in the sense that a table that&#8217;s in 2NF is automatically also in 1NF. Similarly, a table in 3NF is automatically in 2NF, and so on. For most practical applications, putting a database in 3NF is sufficient to ensure a high degree of integrity. To be absolutely sure of its integrity, you must put the database into DK/NF.</p>\n<p>The following lists lay out the criteria for each form:</p>\n<p><b>First Normal Form (1NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be two-dimensional, with rows and columns.</p>\n</li>\n<li>\n<p class=\"first-para\">Each row contains data that pertains to one thing or one portion of a thing.</p>\n</li>\n<li>\n<p class=\"first-para\">Each column contains data for a single attribute of the thing being described.</p>\n</li>\n<li>\n<p class=\"first-para\">Each cell (intersection of row and column) of the table must be single-valued.</p>\n</li>\n<li>\n<p class=\"first-para\">All entries in a column must be of the same kind.</p>\n</li>\n<li>\n<p class=\"first-para\">Each column must have a unique name.</p>\n</li>\n<li>\n<p class=\"first-para\">No two rows may be identical.</p>\n</li>\n<li>\n<p class=\"first-para\">The order of the columns and of the rows does not matter.</p>\n</li>\n</ul>\n<p><b>Second Normal Form (2NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be in first normal form (1NF).</p>\n</li>\n<li>\n<p class=\"first-para\">All non-key attributes (columns) must be dependent on the entire key.</p>\n</li>\n</ul>\n<p><b>Third Normal Form (3NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Table must be in second normal form (2NF).</p>\n</li>\n<li>\n<p class=\"first-para\">Table has no transitive dependencies.</p>\n</li>\n</ul>\n<p><b>Domain-Key Normal Form (DK/NF):</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Every constraint on the table is a logical consequence of the definition of keys and domains.</p>\n</li>\n</ul>\n"},{"title":"SQL data types","thumb":null,"image":null,"content":"<p>Depending on their histories, different SQL implementations support a variety of data types. The SQL specification recognizes nine predefined general types, shown in the lists below</p>\n<p><b>Exact numerics:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">INTEGER</p>\n</li>\n<li>\n<p class=\"first-para\">SMALLINT</p>\n</li>\n<li>\n<p class=\"first-para\">BIGINT</p>\n</li>\n<li>\n<p class=\"first-para\">NUMERIC</p>\n</li>\n<li>\n<p class=\"first-para\">DECIMAL</p>\n</li>\n<li>DECFLOAT</li>\n</ul>\n<p><b>Approximate numerics:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">REAL</p>\n</li>\n<li>\n<p class=\"first-para\">DOUBLE PRECISION</p>\n</li>\n<li>\n<p class=\"first-para\">FLOAT</p>\n</li>\n</ul>\n<p><b>Boolean:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">BOOLEAN</p>\n</li>\n</ul>\n<p><b>Character strings:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">CHARACTER (CHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">CHARACTER VARYING (VARCHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">NATIONAL CHARACTER (NCHAR)</p>\n</li>\n<li>\n<p class=\"first-para\">NATIONAL CHARACTER VARYING (NVARCHAR)</p>\n</li>\n</ul>\n<p><b>Datetimes:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">DATE</p>\n</li>\n<li>\n<p class=\"first-para\">TIME</p>\n</li>\n<li>\n<p class=\"first-para\">TIMESTAMP</p>\n</li>\n<li>\n<p class=\"first-para\">TIME WITH TIMEZONE</p>\n</li>\n<li>\n<p class=\"first-para\">TIMESTAMP WITH TIMEZONE</p>\n</li>\n</ul>\n<p><b>Intervals:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">INTERVAL DAY</p>\n</li>\n<li>\n<p class=\"first-para\">INTERVAL YEAR</p>\n</li>\n</ul>\n<p><b>Large objects:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">BLOB</p>\n</li>\n<li>\n<p class=\"first-para\">CLOB</p>\n</li>\n</ul>\n<p><b>Collection types:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">ARRAY</p>\n</li>\n<li>\n<p class=\"first-para\">MULTISET</p>\n</li>\n</ul>\n<p><b>Other types:</b></p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">ROW</p>\n</li>\n<li>\n<p class=\"first-para\">XML</p>\n</li>\n<li>JSON</li>\n</ul>\n"},{"title":"SQL value functions","thumb":null,"image":null,"content":"<p>These SQL value functions perform operations on data. There are all kinds of operations that could conceivably be performed on data items, but these are some that are needed most often.</p>\n<h3>String value functions</h3>\n<table>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>SUBSTRING</td>\n<td>Extracts a substring from a source string</td>\n</tr>\n<tr>\n<td>SUBSTRING SIMILAR</td>\n<td>Extracts a substring from a source string, using POSIX-based<br />\nregular expressions</td>\n</tr>\n<tr>\n<td>SUBSTRING_REGEX</td>\n<td>Extracts from a string the first occurrence of an XQuery<br />\nregular expression pattern and returns one occurrence of the<br />\nmatching substring</td>\n</tr>\n<tr>\n<td>TRANSLATE_REGEX</td>\n<td>Extracts from a string the first or every occurrence of an<br />\nXQuery regular expression pattern and replaces it or them with an XQuery replacement string</td>\n</tr>\n<tr>\n<td>UPPER</td>\n<td>Converts a character string to all uppercase</td>\n</tr>\n<tr>\n<td>LOWER</td>\n<td>Converts a character string to all lowercase</td>\n</tr>\n<tr>\n<td>BTRIM</td>\n<td>Trims multiple characters both before and after the text</td>\n</tr>\n<tr>\n<td>LTRIM</td>\n<td>Trims multiple characters to the left of the text</td>\n</tr>\n<tr>\n<td>RTRIM</td>\n<td>Trims multiple characters to the right of the text</td>\n</tr>\n<tr>\n<td>TRIM</td>\n<td>Trims off leading or trailing blanks</td>\n</tr>\n<tr>\n<td>LPAD</td>\n<td>Adds padding characters to the left of the text</td>\n</tr>\n<tr>\n<td>RPAD</td>\n<td>Adds padding characters to the right of the text</td>\n</tr>\n<tr>\n<td>TRANSLATE</td>\n<td>Transforms a source string from one character set to<br />\nanother</td>\n</tr>\n<tr>\n<td>CONVERT</td>\n<td>Transforms a source string from one character set to<br />\nanother</td>\n</tr>\n</tbody>\n</table>\n<h3>Numeric value functions</h3>\n<table>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>POSITION</td>\n<td>Returns the starting position of a target string within a<br />\nsource string</td>\n</tr>\n<tr>\n<td>CHARACTER_LENGTH</td>\n<td>Returns the number of characters in a string</td>\n</tr>\n<tr>\n<td>OCTET_LENGTH</td>\n<td>Returns the number of octets (bytes) in a character string</td>\n</tr>\n<tr>\n<td>EXTRACT</td>\n<td>Extracts a single field from a datetime or interval</td>\n</tr>\n</tbody>\n</table>\n<h3>Datetime value functions</h3>\n<table>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td>CURRENT_DATE</td>\n<td>Returns the current date</td>\n</tr>\n<tr>\n<td>CURRENT_TIME(p)</td>\n<td>Returns the current time; (p) is precision of seconds</td>\n</tr>\n<tr>\n<td>CURRENT_TIMESTAMP(p)</td>\n<td>Returns the current date and the current time; (p) is precision of seconds</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"SQL set functions","thumb":null,"image":null,"content":"<p>The SQL set functions give you a quick answer to questions you may have about the characteristics of your data as a whole. How many rows does a table have? What is the highest value in the table? What is the lowest? These are the kinds of questions that the SQL set functions can answer for you.</p>\n<table>\n<tbody>\n<tr>\n<th>Function</th>\n<th>Effect</th>\n</tr>\n<tr>\n<td><code>COUNT</code></td>\n<td>Returns the number of rows in the specified table</td>\n</tr>\n<tr>\n<td><code>MAX</code></td>\n<td>Returns the maximum value that occurs in the specified able</td>\n</tr>\n<tr>\n<td><code>MIN</code></td>\n<td>Returns the minimum value that occurs in the specified table</td>\n</tr>\n<tr>\n<td><code>SUM</code></td>\n<td>Adds up the values in a specified column</td>\n</tr>\n<tr>\n<td><code>AVG</code></td>\n<td>Returns the average of all the values in the specified column</td>\n</tr>\n<tr>\n<td><code>ANY_VALUE</code></td>\n<td>Returns a random value from a specified set of data</td>\n</tr>\n<tr>\n<td><code>GREATEST</code></td>\n<td>Returns the largest value from a specified set of data</td>\n</tr>\n<tr>\n<td><code>LEAST</code></td>\n<td>Returns the smallest value from a specified set of data</td>\n</tr>\n<tr>\n<td><code>LISTAGG</code></td>\n<td>Transforms values from a group of rows into a delimited string</td>\n</tr>\n</tbody>\n</table>\n<h3>Trigonometric and logarithmic functions</h3>\n<p><code>sin</code>, <code>cos</code>, <code>tan</code>, <code>asin</code>, <code>acos</code>, <code>atan</code>, <code>sinh</code>, <code>cosh</code>, <code>tanh</code>, <code>log(&lt;base&gt;, &lt;value&gt;)</code>, <code>log10(&lt;value&gt;)</code>. <code>ln( &lt;value&gt;)</code></p>\n<h3>JSON constructor functions</h3>\n<p><code>JSON_OBJECT</code></p>\n<p><code>JSON_ARRAY</code></p>\n<p><code>JSON_OBJECTAGG</code></p>\n<p><code>JSON_ARRAYAGG</code></p>\n<h3>JSON query functions</h3>\n<p><code>JSON_EXISTS</code></p>\n<p><code>JSON_VALUE</code></p>\n<p><code>JSON_QUERY</code></p>\n<p><code>JSON_TABLE</code></p>\n"},{"title":"SQL WHERE clause predicates","thumb":null,"image":null,"content":"<p>Predicates boil down to either a TRUE or a FALSE result. You can filter out unwanted rows from the result of an SQL query by applying a WHERE clause whose predicate excludes the unwanted rows.</p>\n<h3>Comparison predicates</h3>\n<table>\n<tbody>\n<tr>\n<td>=</td>\n<td>Equal</td>\n</tr>\n<tr>\n<td>&lt;&gt;</td>\n<td>Not equal</td>\n</tr>\n<tr>\n<td>&lt;</td>\n<td>Less than</td>\n</tr>\n<tr>\n<td>&lt;=</td>\n<td>Less than or equal</td>\n</tr>\n<tr>\n<td>&gt;</td>\n<td>Greater than</td>\n</tr>\n<tr>\n<td>&gt;=</td>\n<td>Greater than or equal</td>\n</tr>\n</tbody>\n</table>\n<h3>Other predicates</h3>\n<table>\n<tbody>\n<tr>\n<td>ALL</td>\n<td>BETWEEN</td>\n</tr>\n<tr>\n<td>DISTINCT</td>\n<td>EXISTS</td>\n</tr>\n<tr>\n<td>IN</td>\n<td>LIKE</td>\n</tr>\n<tr>\n<td>MATCH</td>\n<td>NOT IN</td>\n</tr>\n<tr>\n<td>NOT LIKE</td>\n<td>NULL</td>\n</tr>\n<tr>\n<td>OVERLAPS</td>\n<td>SOME, ANY</td>\n</tr>\n<tr>\n<td>UNIQUE</td>\n<td></td>\n</tr>\n</tbody>\n</table>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2024-04-12T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":208690},{"headers":{"creationTime":"2019-05-15T17:19:50+00:00","modifiedTime":"2024-04-12T14:02:57+00:00","timestamp":"2024-04-12T15:01:11+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"slug":"python","categoryId":33606}],"title":"Python All-in-One For Dummies Cheat Sheet","strippedTitle":"python all-in-one for dummies cheat sheet","slug":"python-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Learn about Python operators, Python data types, and Python functions, which are all important parts of this flexible programming language.","noIndex":0,"noFollow":0},"content":"Python is a flexible programming language that has become increasingly popular in the past few years. This cheat sheet is designed to give you a handy resource for common Python data types, Python operators, and Python functions. It includes Python data types, operators, special characters, f-strings, and functions for working with robots.","description":"Python is a flexible programming language that has become increasingly popular in the past few years. This cheat sheet is designed to give you a handy resource for common Python data types, Python operators, and Python functions. It includes Python data types, operators, special characters, f-strings, and functions for working with robots.","blurb":"","authors":[{"authorId":26710,"name":"John Shovic","slug":"john-shovic","description":"John Shovic, PhD, is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/26710"}},{"authorId":10199,"name":"Alan Simpson","slug":"alan-simpson","description":" <p><b>John Shovic, PhD,</b> is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence.</p> <p><b>Alan Simpson</b> is a web development professional who has published more than 100 articles and books on technology.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/10199"}}],"primaryCategoryTaxonomy":{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":264919,"title":"How to Define and Use Python Lists","slug":"how-to-define-and-use-python-lists","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264919"}},{"articleId":264911,"title":"How to Use Lambda Functions in Python","slug":"how-to-use-lambda-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264911"}},{"articleId":264906,"title":"Your Guide to the Python Standard Library","slug":"your-guide-to-the-python-standard-library","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264906"}},{"articleId":264894,"title":"A Beginner’s Guide to Python Versions","slug":"a-beginners-guide-to-python-versions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264894"}},{"articleId":264888,"title":"How to Build a Simple Neural Network in Python","slug":"how-to-build-a-simple-neural-network-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264888"}}],"fromCategory":[{"articleId":264919,"title":"How to Define and Use Python Lists","slug":"how-to-define-and-use-python-lists","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264919"}},{"articleId":264911,"title":"How to Use Lambda Functions in Python","slug":"how-to-use-lambda-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264911"}},{"articleId":264906,"title":"Your Guide to the Python Standard Library","slug":"your-guide-to-the-python-standard-library","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264906"}},{"articleId":264894,"title":"A Beginner’s Guide to Python Versions","slug":"a-beginners-guide-to-python-versions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264894"}},{"articleId":264888,"title":"How to Build a Simple Neural Network in Python","slug":"how-to-build-a-simple-neural-network-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264888"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281833,"slug":"python-all-in-one-for-dummies","isbn":"9781394236152","categoryList":["technology","programming-web-design","python"],"amazon":{"default":"https://www.amazon.com/gp/product/1394236158/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1394236158/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1394236158-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1394236158/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1394236158/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/python-all-in-one-for-dummies-cover-9781394236152-203x255.jpg","width":203,"height":255},"title":"Python All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"","authors":[{"authorId":34775,"name":"John C. Shovic","slug":"john-c-shovic","description":" <p><b>John Shovic, PhD,</b> is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence.</p> <p><b>Alan Simpson</b> is a web development professional who has published more than 100 articles and books on technology.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/34775"}},{"authorId":10199,"name":"Alan Simpson","slug":"alan-simpson","description":" <p><b>John Shovic, PhD,</b> is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence.</p> <p><b>Alan Simpson</b> is a web development professional who has published more than 100 articles and books on technology.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/10199"}},{"authorId":34784,"name":"","slug":"","description":" <p><b>John Shovic, PhD,</b> is a computer science faculty member at the University of Idaho specializing in robotics and artificial intelligence.</p> <p><b>Alan Simpson</b> is a web development professional who has published more than 100 articles and books on technology.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/34784"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[{"title":"Pondering the Pi Possibilities","slug":"pondering-the-pi-possibilities","collectionId":297524}],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394236152&quot;]}]\" id=\"du-slot-66194cb7ec247\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394236152&quot;]}]\" id=\"du-slot-66194cb7ecae6\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":261606,"title":"Python Data Types","slug":"","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/261606"}},{"articleId":261610,"title":"Python Operators and Special Characters","slug":"","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/261610"}},{"articleId":261613,"title":"Python Functions for Working with Robots","slug":"","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/261613"}}],"content":[{"title":"Python data types","thumb":null,"image":null,"content":"<p>Python, like all programming languages, uses data types to classify types of information. The specific data type you use determines the values you can assign to it, how you can store it, and what you can do to it (including the operations you can perform on it).</p>\n<div class=\"figure-container\"><figure id=\"attachment_261607\" aria-labelledby=\"figcaption_attachment_261607\" class=\"wp-caption alignnone\" style=\"width: 545px\"><img loading=\"lazy\" class=\"size-full wp-image-261607\" src=\"https://www.dummies.com/wp-content/uploads/Python-3D.jpg\" alt=\"Python-3D\" width=\"535\" height=\"357\" /><figcaption id=\"figcaption_attachment_261607\" class=\"wp-caption-text\">Source: ©supimol kumying / Shutterstock</figcaption></figure></div><div class=\"clearfix\"></div>\n<p>You deal with written information all the time and probably don’t think about the difference between numbers and text (that is, letters and words). But there’s a big difference between numbers and text in a computer because with numbers, you can do arithmetic (add, subtract, multiple, divide). For example, everybody knows that 1+1 = 2. The same doesn’t apply to letters and words. The expression A+A doesn’t necessary equal B or AA or anything else because unlike numbers, letters and words aren’t quantities. You can buy <em>12 apples</em> at the store, because 12 is a quantity, a number — a <em>scalar value</em> in programming jargon. You can’t really buy a <em>snorkel apples</em> because a snorkel is a thing, it’s not a quantity, number, or scalar value.</p>\n<p>Strings are sort of the opposite of numbers. With numbers, you can add, subtract, multiply, and divide because the numbers represent quantities. Strings are for just about everything else. Names, addresses, and all other kinds of text you see every day would be a <em>string</em> in Python (and for computers in general). It’s called a <em>string</em> because it’s a string of characters (letters, spaces, punctuation marks, maybe some numbers). To us, a string usually has some meaning, like a person’s name or address, but computers don’t have eyes to see with or brains to think with or any awareness that humans even exist, so if it’s not something on which you can do arithmetic, it’s just a string of characters.</p>\n<p>The following list shows the seven most common Python data types:</p>\n<ul>\n<li><strong><code>integer</code>:</strong> These are whole numbers, positive or negative (including 0). Example: <code>100</code>.</li>\n<li><strong><code>float</code>:</strong> Floating-point numbers are real numbers, rational or irrational. In most cases, this means numbers with decimal fractions. Example: <code>123.45</code>.</li>\n<li><strong><code>string</code>:</strong> Strings are sequences of characters, or text, enclosed in quotes. Example: <code>\"any text\"</code>.</li>\n<li><strong><code>boolean</code>:</strong> Can be one of two values, true or false. Example: <code>True </code>or <code>False</code>.</li>\n<li><strong><code>list</code>:</strong> An ordered sequence of elements. With a list, the order of the elements can be changed. Example: [<em><code>value1</code></em>, <em><code>value2</code></em>, &#8230; ].</li>\n<li><strong><code>tuple</code>:</strong> An unchangeable ordered sequence of elements. Example: (<em><code>value1</code></em>, <em><code>value2</code></em>, &#8230;).</li>\n<li><strong><code>dictionary</code>:</strong> This is Python’s mapping data type. Dictionaries map keys to values as a means of storing information. Example: {<em><code>key1</code></em>:<em>value1</em>, <em><code>key2</code></em>:<em>value2</em>, &#8230;}.</li>\n</ul>\n"},{"title":"Python operators and special characters","thumb":null,"image":null,"content":"<p>With Python and for computers in general it helps to think of information as being one of the following data types: number, string, or Boolean. You also use computers to <em>operate</em> on that information, meaning to do any necessary math or comparisons or searches or whatever to help you find information and organize it in a way that makes sense to you.</p>\n<p>Python offers many <a href=\"https://dummies-wp-admin.dummies.com/programming/python/beginning-programming-python-dummies-cheat-sheet/\">different operators</a> and special characters for working with and comparing types of information. Here we just summarize them all for future reference, without going into great detail.</p>\n<h2>Special Characters</h2>\n<table>\n<tbody>\n<tr>\n<td width=\"266\"><strong><code>#</code></strong></td>\n<td width=\"266\">comment</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>\"\"\"</code></strong></td>\n<td width=\"266\">string literal</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>\\n</code></strong></td>\n<td width=\"266\">new line</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>\\<em>char</em></code></strong></td>\n<td width=\"266\">escape character</td>\n</tr>\n</tbody>\n</table>\n<h2>Numeric Operators (in Order of Precedence)</h2>\n<table>\n<tbody>\n<tr>\n<td width=\"266\"><strong><code>()</code></strong></td>\n<td width=\"266\">grouping</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>**</code></strong></td>\n<td width=\"266\">exponent</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>–</code></strong></td>\n<td width=\"266\">negation</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>*</code></strong></td>\n<td width=\"266\">multiplication</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>/</code></strong></td>\n<td width=\"266\">division</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>%</code></strong></td>\n<td width=\"266\">modulus</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>//</code></strong></td>\n<td width=\"266\">floor division</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>+</code></strong></td>\n<td width=\"266\">addition</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>–</code></strong></td>\n<td width=\"266\">subtraction</td>\n</tr>\n</tbody>\n</table>\n<h2>Comparison Operators</h2>\n<table>\n<tbody>\n<tr>\n<td width=\"266\"><strong><code>==</code></strong></td>\n<td width=\"266\">equal</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>!=</code></strong></td>\n<td width=\"266\">not equal</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>&gt; </code></strong></td>\n<td width=\"266\">greater than</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>&lt; </code></strong></td>\n<td width=\"266\">less than</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>&gt;=</code></strong></td>\n<td width=\"266\">greater than or equal to</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>&lt;=</code></strong></td>\n<td width=\"266\">less than or equal to</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>and</code></strong></td>\n<td width=\"266\">logical and</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>or</code></strong></td>\n<td width=\"266\">logical or</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>not</code></strong></td>\n<td width=\"266\">logical not</td>\n</tr>\n</tbody>\n</table>\n<h2>f strings</h2>\n<table>\n<tbody>\n<tr>\n<td width=\"266\"><strong><em><code>number</code></em></strong></td>\n<td width=\"266\">width</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>.2f</code></strong></td>\n<td width=\"266\">1234.56</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>,.2f</code></strong></td>\n<td width=\"266\">1,234,56</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>.1%</code></strong></td>\n<td width=\"266\">6.5%</td>\n</tr>\n<tr>\n<td width=\"266\"><strong><code>:</code></strong></td>\n<td width=\"266\">align left</td>\n</tr>\n<tr>\n<td width=\"266\"><code>^</code></td>\n<td width=\"266\">center</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n"},{"title":"Python functions for working robots","thumb":null,"image":null,"content":"<p>The basic components of robots can be controlled with Python functions and can work together to accomplish robotic tasks. One way to do so is through the use of a python class file called <code>RobotInterface.py</code>. Here is a list of the functions that are defined in the <code>RobotInterface.py</code> library:</p>\n<ul>\n<li><strong>Utilities</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>Color( red, green, blue, white = 0)</code></p>\n<p style=\"padding-left: 30px;\">Converts the provided red, green, blue color to a 24-bit color value. Each color component should be a value 0–255, where 0 is the lowest intensity and 255 is the highest intensity.</p>\n<p style=\"padding-left: 30px;\"><code>allLEDSOff()</code></p>\n<p style=\"padding-left: 30px;\">Turns all the LEDs off on the robot.</p>\n<p style=\"padding-left: 30px;\"><code>centerAllServos()</code></p>\n<p style=\"padding-left: 30px;\">Moves all servos to their center position.</p>\n<ul>\n<li><strong>Front LEDs</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>set_Front_LED_On(colorLED)</code></p>\n<p style=\"padding-left: 30px;\">One of these constants: <code>RobotInterface.left_R</code>, <code>RobotInterface.left_G</code>, <code>RobotInterface.left_B</code>, <code>RobotInterface.right_R</code>, <code>RobotInterface.right_G</code>, <code>RobotInterface.right_B</code>.</p>\n<p style=\"padding-left: 30px;\"><code>set_Front_LED_Off(colorLED)</code></p>\n<p style=\"padding-left: 30px;\">One of these constants: <code>RobotInterface.left_R</code>, <code>RobotInterface.left_G</code>, <code>RobotInterface.left_B</code>, <code>RobotInterface.right_R</code>, <code>RobotInterface.right_G</code>, <code>RobotInterface.right_B</code>.</p>\n<ul>\n<li><strong>Strip LEDs</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>rainbowCycle( wait_ms = 20, iterations = 3)</code></p>\n<p style=\"padding-left: 30px;\">Cycles the Pixel LEDs through the rainbow for at least three iterations.</p>\n<p style=\"padding-left: 30px;\"><code>colorWipe</code>( color)</p>\n<p style=\"padding-left: 30px;\">Changes all the Pixel LEDs to the same color.</p>\n<p style=\"padding-left: 30px;\"><code>setPixelColor( pixel, color, brightness)</code></p>\n<p style=\"padding-left: 30px;\">Sets an individual Pixel to a specific color; brightness is for the whole string.</p>\n<ul>\n<li><strong>Ultrasonic Sensor</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>fetchUltraDistance()</code></p>\n<p style=\"padding-left: 30px;\">Returns the distance in front of the sensor in centimeters (cm).</p>\n<p style=\"padding-left: 30px;\"><code>motorForward( speed, delay)</code></p>\n<p style=\"padding-left: 30px;\">Moves the robot forward at <code>speed</code> (0–100) for <code>delay</code> seconds.</p>\n<p style=\"padding-left: 30px;\"><code>motorBackward( speed, delay)</code></p>\n<p style=\"padding-left: 30px;\">Moves the robot backwards at <code>speed</code> (0–100) for <code>delay</code> seconds.</p>\n<p style=\"padding-left: 30px;\"><code>stopMotor()</code></p>\n<p style=\"padding-left: 30px;\">Immediately stops the drive motor.</p>\n<ul>\n<li><strong>Head Turn Servo</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>headTurnLeft()</code></p>\n<p style=\"padding-left: 30px;\">Turns head all the way left.</p>\n<p style=\"padding-left: 30px;\"><code>headTurnRight()</code></p>\n<p style=\"padding-left: 30px;\">Turns head all the way right.</p>\n<p style=\"padding-left: 30px;\"><code>headTurnMiddle()</code></p>\n<p style=\"padding-left: 30px;\">Turns the head to the middle.</p>\n<p style=\"padding-left: 30px;\"><code>headTurnPercent( percent)</code></p>\n<p style=\"padding-left: 30px;\">Turns the head as a percent 0–100, where 0 is all the way left and 100 is all the way right.</p>\n<ul>\n<li><strong>Head Tilt Servo</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>headTiltDown()</code></p>\n<p style=\"padding-left: 30px;\">Tilts the head all the way down.</p>\n<p style=\"padding-left: 30px;\"><code>headTiltUp()</code></p>\n<p style=\"padding-left: 30px;\">Tilts the head all the way up.</p>\n<p style=\"padding-left: 30px;\"><code>headTiltMiddle()</code></p>\n<p style=\"padding-left: 30px;\">Tilts the head to the middle.</p>\n<p style=\"padding-left: 30px;\"><code>headTiltPercent( percent)</code></p>\n<p style=\"padding-left: 30px;\">Tilts the head as a percent 0–100, where 0 is all the way up and 100 is all the way down.</p>\n<ul>\n<li><strong>Front Wheel Servo</strong></li>\n</ul>\n<p style=\"padding-left: 30px;\"><code>wheelsLeft()</code></p>\n<p style=\"padding-left: 30px;\">Turns the wheels all the way to the left.</p>\n<p style=\"padding-left: 30px;\"><code>wheelsRight()</code></p>\n<p style=\"padding-left: 30px;\">Turns the wheels all the way to the right.</p>\n<p style=\"padding-left: 30px;\"><code>wheelsMiddle()</code></p>\n<p style=\"padding-left: 30px;\">Turns the wheels to the middle.</p>\n<p style=\"padding-left: 30px;\"><code>wheelsPercent(percent)</code></p>\n<p style=\"padding-left: 30px;\">Turns the wheels as a percent 0–100, where 0 is all the way left and 100 is all the way right.</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2024-04-12T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":261616},{"headers":{"creationTime":"2024-03-26T15:35:09+00:00","modifiedTime":"2024-03-26T15:35:09+00:00","timestamp":"2024-03-26T18:01:09+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"Building DIY Websites For Dummies Cheat Sheet","strippedTitle":"building diy websites for dummies cheat sheet","slug":"building-diy-websites-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Unlock the secrets and best practices that web developers know and implement when building any quality website with this cheat sheet.","noIndex":0,"noFollow":0},"content":"If you want to build your own website from start to finish, this book serves as a great resource. It includes many secrets and best practices that web developers know and implement when building any quality website. This cheat sheet includes bits and pieces of what you'll <a href=\"/book/technology/programming-web-design/general-programming-web-design/building-diy-websites-for-dummies-301663/\" target=\"_blank\" rel=\"noopener\">find in the book</a>.","description":"If you want to build your own website from start to finish, this book serves as a great resource. It includes many secrets and best practices that web developers know and implement when building any quality website. This cheat sheet includes bits and pieces of what you'll <a href=\"/book/technology/programming-web-design/general-programming-web-design/building-diy-websites-for-dummies-301663/\" target=\"_blank\" rel=\"noopener\">find in the book</a>.","blurb":"","authors":[{"authorId":35385,"name":"Jennifer DeRosa","slug":"jennifer-derosa","description":" <p> <b>Jennifer DeRosa</b> is the founder of Toto Coaching, which walks the DIY website builder through the process of building a website from start to finish. Jennifer has been building websites since 1994. She formed her web development agency in 2001, growing it into a successful website development agency over two decades. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/35385"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[],"fromCategory":[{"articleId":299575,"title":"HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet","slug":"html-css-javascript-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/299575"}},{"articleId":265680,"title":"Using DevOps To Improve Engineering","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"How To Automate DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"How To Choose a Cloud Service Provider for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":301663,"slug":"building-diy-websites-for-dummies","isbn":"9781394232987","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1394232985/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1394232985/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1394232985-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1394232985/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1394232985/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/building-diy-websites-for-dummies-cover-9781394232987-203x255.jpg","width":203,"height":255},"title":"Building DIY Websites For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><p> <b><b data-author-id=\"35385\">Jennifer DeRosa</b></b> is the founder of Toto Coaching, which walks the DIY website builder through the process of building a website from start to finish. Jennifer has been building websites since 1994. She formed her web development agency in 2001, growing it into a successful website development agency over two decades.</p>","authors":[{"authorId":35385,"name":"Jennifer DeRosa","slug":"jennifer-derosa","description":" <p> <b>Jennifer DeRosa</b> is the founder of Toto Coaching, which walks the DIY website builder through the process of building a website from start to finish. Jennifer has been building websites since 1994. She formed her web development agency in 2001, growing it into a successful website development agency over two decades. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/35385"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394232987&quot;]}]\" id=\"du-slot-66030d6670d0a\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394232987&quot;]}]\" id=\"du-slot-66030d6671483\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":0,"title":"","slug":null,"categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/"}}],"content":[{"title":"Building pages that work","thumb":null,"image":null,"content":"<p>There is a lot to consider as you build your site. However, as you organize your pages, keep in mind these five main ideas:</p>\n<ul>\n<li>Build trust with your visitors.</li>\n<li>Resonate with your visitors.</li>\n<li>Let your visitors know your offering.</li>\n<li>Give your visitors the same information in multiple places — in other words, reiterate topics on each page. No one is going to read your website like a book from start to finish, so you need to “catch” them in a few places.</li>\n<li>Build a website where visitors don’t need to think that much. If you provide the information that visitors would naturally want to know when they visit your service pages, you have done a good job. This is good UX.</li>\n</ul>\n"},{"title":"Designing your homepage","thumb":null,"image":null,"content":"<p>Your homepage could be the most important page on your website, so you want to make sure it’s doing its job! The homepage has a lot of jobs, but here are the four most important:</p>\n<ul>\n<li><strong>Lets visitors know they’re in the right place by showing the services or products you offer and, if applicable, your location.</strong> If you provide local services, let visitors know right away where you are located. For example, if you are a landscaper or doctor in Idaho, people in California or Arizona are probably not going to use your services. Many times, a business will have a similar name or the same name but they might be in different states&#8230; so you want to let visitors know right away that they are in the correct place!</li>\n<li><strong>Makes a great first impression and encourage the visitors to stick around and engage with you. </strong>You want the homepage to look gorgeous and bring the visitors in. You have three-five seconds to make this impression, so right up front you want to connect with the visitors.</li>\n<li><strong>Shows that your company is up to date with a modern website.</strong> If visitors see an outdated, old, shall I say “vintage” website, they will translate that feeling of being “out of touch” or “behind the times” to your company. You want to show through your modern website homepage that you are keeping up with modern technologies, services, and techniques.</li>\n<li><strong>Strategically drives people to content.</strong> You want visitors to take action toward your primary goals on your website.</li>\n</ul>\n<p>On modern websites, information is typically organized in rows down the page. The first row on your homepage is crucial, as it&#8217;s the initial area that visitors see. Therefore, you want to dedicate significant effort to perfecting this row.</p>\n"},{"title":"Finding good stock photography for your site","thumb":null,"image":null,"content":"<p>There is good stock photography and horrible stock photography. When you are on a website searching the photography, there are a few factors you want to keep in mind.</p>\n<p>High-quality, relevant images can draw in visitors, create an emotional connection, and convey your brand&#8217;s message effectively. On the other hand, poor quality or overused images can turn visitors away. Here are some tips for choosing good stock photography for your website:</p>\n<ul>\n<li><strong>Consider your audience:</strong> When selecting stock photography for your website, it is important to consider your target audience. Ask yourself what type of images will resonate most with your audience. Choose images that help communicate your message in a meaningful way.</li>\n<li><strong>Consider your brand&#8217;s tone and aesthetic:</strong> Images should align with your brand&#8217;s tone and aesthetic.</li>\n<li><strong>Choose the color palette:</strong> Choose images with colors that complement or match your brand&#8217;s color palette. This helps create a consistent and harmonious visual experience.</li>\n<li><strong>Make sure photos are authentic:</strong> Choose images that feel genuine and natural, as opposed to overly staged or unrealistic. Authentic images are more relatable and can help establish trust with your audience.</li>\n<li><strong>Pick</strong> <strong>creative commons/royalty free images:</strong> When searching for free stock photos, look for Royalty Free or Creative Commons labeled images on websites. Some software may offer different licensed images, which can become costly, so be cautious. Always read the terms of use. If you happen to use an image that you do not have the rights to, you can get fined significantly. Don’t get into this situation. Purchase them, or if they are free, make sure you are allowed to use them.</li>\n</ul>\n"},{"title":"Choosing file formats for images","thumb":null,"image":null,"content":"<p>Here is a quick summary of the image file formats:</p>\n<ul>\n<li>JPEG is a good choice for photographs and images with lots of colors.</li>\n<li>PNG is a good choice for graphics and images with transparent backgrounds.</li>\n<li>GIF is a good choice for simple graphics and animations.</li>\n<li>WebP is a good choice for graphics, photographs, and animation with reduced image file sizes.</li>\n<li>SVG is a good choice for graphics and images that need to be resized without losing quality, but most likely you will not use these.</li>\n<li>At this time, it&#8217;s best to convert any HEIC images to JPG images for best results.</li>\n</ul>\n"},{"title":"Following basic design rules","thumb":null,"image":null,"content":"<p>If you remember only one thing, remember to always strive for simplicity and consistency in your design:</p>\n<ul>\n<li>Use the same fonts in the same places.</li>\n<li>Use less color to begin and add tiny elements as you go along.</li>\n<li>Use the same types of borders across your site.</li>\n<li>Make sure all your buttons are consistent.</li>\n<li>Employ lots of whitespace.</li>\n<li>Choose crisp, clear images that support your content and do not look staged.</li>\n</ul>\n"},{"title":"Researching keywords","thumb":null,"image":null,"content":"<p>Keyword research helps you determine which keywords people are typing into search engines. You can literally “research” the keywords that people are using in searches and determine if those searches have grown or shrunk recently. These are powerful insights that will help you choose the perfect keywords and phrases to use on your website.</p>\n<p>The goal is to build a list of keywords and keyword phrases that you want to appear in the search results. The best keywords stand on actual data — they are keywords and phrases that people are actually typing in and searching, thousands of times a month.</p>\n<p>Follow these steps to begin building your seed keywords:</p>\n<ol>\n<li>\n<p class=\"first-para\"><strong>Open a web browser, head over to Google, and type some search terms that you think your customers will use or have used to find your website.</strong></p>\n<p class=\"child-para\">When you see the SERP, look closely at the websites that Google returns for your search and ask: Does this look like a list that your company should appear in?</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>If list doesn&#8217;t match your business, refine your search terms and use long-tail keyword phrases. Find some specific phrases that, when searched, return a list of your competition.</strong></p>\n<p class=\"child-para\">These are the results you want to appear in, and hopefully appear on top of! These phrases are a great place to start your keyword research. Do this search for each term you can think of.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Add these phrases to your initial keyword list.</strong></p>\n</li>\n<li>\n<p class=\"first-para\"><strong>For each keyword phrase you choose, scroll down the page.</strong> You will see “Related Searches” (at the time of the publishing of this book Google is calling it Related Searches. They used to call it “People Also Search For” and “People Also Ask”).</p>\n<p class=\"child-para\">This section can be a valuable strategy when it comes to generating search terms and enhancing your content strategy because it shows related search queries that you can use to expand your keyword list, inspire content ideas, reveal user intent, aid you in competitive analysis, and uncover long-tail keyword opportunities. Look at this list and add these words to your seed keyword list.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>You should now have a pretty long list of keywords. Take that list and put them into a tool of your choice to get some real data.</strong></p>\n<p class=\"child-para\">There are a ton of tools you can use, and I mention just a few here.</p>\n</li>\n</ol>\n"},{"title":"Obtaining backlinks","thumb":null,"image":null,"content":"<p>A <em>backlink</em> is simply a link to your website from another website. You might also hear backlinks also called “incoming links” or “inbound links” and the sites that link to your website are called “referring domains.”</p>\n<p>Other websites will link to your website if they view your website as important. You can think of a backlink to your website as a vote of confidence! Search engines use backlinks to determine the value of your website.</p>\n<p>There are some quick and easy ways you can get some backlinks — the rest is hard work. The process of getting links is called <em>link building.</em> You get backlinks by either outright asking for them or because your content is good enough that another site chooses to link to it.</p>\n<p>Here are some ways you can obtain backlinks to your website:</p>\n<ul>\n<li>Include links to your website from your social media channels. Set up social media profiles on all the platforms and then link back to your website.</li>\n<li>Many associations have a public online directory where they list a link to your website. Chambers, networking groups, clubs, and associations are good places to look.</li>\n<li>Ask blog owners of reputable, informative blogs in your industry if you can write a guest post. Then, write an amazing article with an author bio and ask for a follow link back to your website.</li>\n<li>Ask your local paper or better yet, a regional or national paper to do a story on your company or organization. This is a great way to obtain a backlink that is high authority.</li>\n<li>Write amazing, complete how-to guides or other content, and then ask other websites in your industry to link to your valuable content. This is sometimes called <em>reverse outreach</em>. This needs to be a comprehensive guide with great, valuable information. It is even better if there are not a lot of articles already online about this topic.</li>\n<li>Publish free guides or a free tool is great, as other websites might want to link to your free guide or tool to help their visitors.</li>\n<li>Check if there are unlinked mentions of your brand on the Internet, meaning your brand was mentioned but they did not link to your website. When you find these, ask the websites to include a link.</li>\n<li>Check with your suppliers or those you supply to. Will they link to your website? Do a bit of research on their websites and see if there is a natural spot where they could link or ask your rep.</li>\n<li>Many industries grant awards. Find those websites behind the awards and see what the application process is like. Determine if you can receive a follow backlink to your site.</li>\n<li>Some people use the broken link method and this can be effective but takes some time. If you install the Chrome extension called Check My Links and then visit websites in your industry, you can see using this tool to identify links that the website has provided that are broken. Then, write a great alternative to the broken link. Reach out to the webmaster that takes care of the site with the broken links. Tell them how much you love their content and that you found a broken link, but that you have created an alternative and they should link to your site.</li>\n<li>Local directories and citations are important. If you provide services or products to a local area or if you are a brick and mortar store, you are known as a local business. You should set up directories and citations. There are two ways to do this: you can create your own directory listings or you can pay a service to set these up for you. Either way, this is very important.</li>\n<li>HARO (Help a Reporter Out) is a website that matches experts and writers with journalists. Many journalists are looking for experts in fields to help them with their articles. You can create an account on the HARO system and you will be sent requests for articles.</li>\n<li>Find influencers who like what you have to offer and see if they will link to your website. This is becoming a completely new and vibrant industry. There are influencer brokers you can contact as well.</li>\n<li>Interview people, post the interview on your website, and then place a link to their website. They will most likely link back to this article.</li>\n</ul>\n<p>Want to learn more? Get the <em><a href=\"https://www.amazon.com/gp/product/1394232985/ref=as_li_tl?ie=UTF8&amp;tag=wiley01-20\" target=\"_blank\" rel=\"noopener\">Building DIY Websites For Dummies</a></em> book.</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2024-03-26T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":301736},{"headers":{"creationTime":"2016-03-27T16:49:33+00:00","modifiedTime":"2024-01-18T18:44:02+00:00","timestamp":"2024-01-18T21:01:08+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Blogging & Website Platforms","_links":{"self":"https://dummies-api.dummies.com/v2/categories/34376"},"slug":"blogging-website-platforms","categoryId":34376},{"name":"WordPress","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33609"},"slug":"wordpress","categoryId":33609}],"title":"WordPress All-in-One For Dummies Cheat Sheet","strippedTitle":"wordpress all-in-one for dummies cheat sheet","slug":"wordpress-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Start by familiarizing yourself with the WordPress dashboard, then learn where to find more support for managing WordPress site content with this cheat sheet.","noIndex":0,"noFollow":0},"content":"Tailor your blog with WordPress software, whether you're writing, editing, or publishing WordPress site content. An understanding of WordPress's dashboard controls and of the types of content available to you helps you get the most out of your website. Also, when all else fails, it's good to know where you can turn to for help with WordPress.","description":"Tailor your blog with WordPress software, whether you're writing, editing, or publishing WordPress site content. An understanding of WordPress's dashboard controls and of the types of content available to you helps you get the most out of your website. Also, when all else fails, it's good to know where you can turn to for help with WordPress.","blurb":"","authors":[{"authorId":9028,"name":"Lisa Sabin-Wilson","slug":"lisa-sabin-wilson","description":" <p><b>Lisa Sabin&#45;Wilson</b> is cofounder of WebDevStudios, one of the largest WordPress design and development agencies in the world. She is a regular public speaker at national events on topics such as WordPress, development, design, CSS, and social media. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9028"}}],"primaryCategoryTaxonomy":{"categoryId":33609,"title":"WordPress","slug":"wordpress","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33609"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":167476,"title":"Designing a Website with WordPress Designers","slug":"designing-a-website-with-wordpress-designers","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/167476"}},{"articleId":163671,"title":"Filter by Internet Protocol (IP) Address to Limit Access to the WordPress Dashboard","slug":"filter-by-internet-protocol-ip-address-to-limit-access-to-the-wordpress-dashboard","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/163671"}}],"fromCategory":[{"articleId":244958,"title":"Contemplating the Structure of Your WordPress Website","slug":"contemplating-structure-wordpress-website","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/244958"}},{"articleId":244955,"title":"How to Use Tags with Parameters for Sidebars in WordPress","slug":"use-tags-parameters-sidebars-wordpress","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/244955"}},{"articleId":244951,"title":"How to Use Sidebar Templates in WordPress","slug":"use-sidebar-templates-wordpress","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/244951"}},{"articleId":244948,"title":"Getting WordPress to Check for Your Custom Field","slug":"getting-wordpress-check-custom-field","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/244948"}},{"articleId":244944,"title":"Entering the Custom Field Code in the WordPress Template File","slug":"entering-custom-field-code-wordpress-template-file","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/244944"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281904,"slug":"wordpress-all-in-one-for-dummies-4th-edition","isbn":"9781394225385","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"amazon":{"default":"https://www.amazon.com/gp/product/1394225385/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1394225385/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1394225385-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1394225385/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1394225385/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/wordpress-all-in-one-for-dummies-5th-edition-cover-9781394225385-203x255.jpg","width":203,"height":255},"title":"WordPress All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><p><b>Lisa Sabin&#45;Wilson</b> is cofounder of WebDevStudios, one of the largest WordPress design and development agencies in the world. She is a regular public speaker at national events on topics such as WordPress, development, design, CSS, and social media.</p>","authors":[{"authorId":9028,"name":"Lisa Sabin-Wilson","slug":"lisa-sabin-wilson","description":" <p><b>Lisa Sabin&#45;Wilson</b> is cofounder of WebDevStudios, one of the largest WordPress design and development agencies in the world. She is a regular public speaker at national events on topics such as WordPress, development, design, CSS, and social media. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9028"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;blogging-website-platforms&quot;,&quot;wordpress&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394225385&quot;]}]\" id=\"du-slot-65a9919491b41\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;blogging-website-platforms&quot;,&quot;wordpress&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394225385&quot;]}]\" id=\"du-slot-65a9919493b66\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":167484,"title":"The WordPress Dashboard","slug":"the-wordpress-dashboard","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/167484"}},{"articleId":167485,"title":"WordPress Content Types","slug":"wordpress-content-types","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/167485"}},{"articleId":167479,"title":"WordPress Resources","slug":"wordpress-resources","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/167479"}},{"articleId":167476,"title":"Designing a Website with WordPress Designers","slug":"designing-a-website-with-wordpress-designers","categoryList":["technology","programming-web-design","blogging-website-platforms","wordpress"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/167476"}}],"content":[{"title":"The WordPress dashboard","thumb":null,"image":null,"content":"<p>The WordPress Dashboard gives you an all-in-one glance at your website’s statistics and activity. This table gives you brief descriptions of the main menu items in the WordPress Dashboard that apply across all versions of WordPress.com and WordPress.org. Each version provides different options, but the basic main menu of the Dashboard is standard across all versions.</p>\n<table>\n<tbody>\n<tr>\n<th>Menu</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>Dashboard</td>\n<td>Find basic information and statistics for your site, as well as information from the WordPress Development Site and other sites run by those involved with WordPress development or resources.</td>\n</tr>\n<tr>\n<td>Posts</td>\n<td>Write new posts and edit previous ones. Create categories to organize your posts by topic; upload images; create post excerpts; send trackbacks; manage custom fields.</td>\n</tr>\n<tr>\n<td>Media</td>\n<td>View all media files you’ve uploaded to your site, including images, audio, and video. Upload and manage new media files with the built-in media uploader.</td>\n</tr>\n<tr>\n<td>Pages</td>\n<td>Write and publish new static pages for your site, edit or delete previously published pages, and assign pages to custom page templates.</td>\n</tr>\n<tr>\n<td>Comments</td>\n<td>Manage comments here by viewing, editing, or deleting them; also manage your comment moderation queue and comment/trackback spam.</td>\n</tr>\n<tr>\n<td>Appearance</td>\n<td>Manage your WordPress themes by viewing them, activating them, and editing them using the site editor. Use and create block patterns.</td>\n</tr>\n<tr>\n<td>Plugins</td>\n<td>View a listing of plugins installed in your WordPress site. Find new plugins, and install, activate, deactivate, upgrade, and edit them.</td>\n</tr>\n<tr>\n<td>Users</td>\n<td>Manage your users and subscribers and edit your own profile.</td>\n</tr>\n<tr>\n<td>Tools</td>\n<td>Import data into your site from another content management platform (such as Blogger, Typepad, or Movable Type) or export your current site data into a backup file. Upgrade your WordPress software to the latest version using the auto-upgrade feature.</td>\n</tr>\n<tr>\n<td>Settings</td>\n<td>Set the general options for your site, and find settings for posts, RSS feed, discussion options, privacy, and permalinks.</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"WordPress content types","thumb":null,"image":null,"content":"<p>Content is the lifeblood of a website, regardless of author or topic. Populate your site with a variety of content types to engage reader interest and to ensure return visits. WordPress offers several types of content that can be published on your website using the different, built-in features.</p>\n<table>\n<tbody>\n<tr>\n<th>Menu</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>Posts</td>\n<td>Articles that get written and published to your site — posts are included as part of your archived site.</td>\n</tr>\n<tr>\n<td>Pages</td>\n<td>Static, individual pages do not get published and archived as part of the site on your site; rather are used as standalone pages to publish items like an &#8220;About Me&#8221; page.</td>\n</tr>\n<tr>\n<td>Categories</td>\n<td>File your blog posts into different topics.</td>\n</tr>\n<tr>\n<td>Tags</td>\n<td>Define micro-categories for your posts by using tags to define extended keywords to help your readers locate posts on your site relevant to the topic they want to read about.</td>\n</tr>\n<tr>\n<td>Images and Galleries</td>\n<td>Upload photos or images and create photo galleries, or a portfolio of images.</td>\n</tr>\n<tr>\n<td>Media files</td>\n<td>Upload audio files for podcasting, or video files for video publishing. Even upload files like PDFs or Microsoft Word documents to provide downloadable content, like e-books or manuals.</td>\n</tr>\n<tr>\n<td>Custom Post Types</td>\n<td>Create different methods of posting niche content types on your site, like a photo gallery, video gallery, or a repository of reviews for things like movies, books, and music (just to name a few of many examples).</td>\n</tr>\n<tr>\n<td>Custom Post Formats</td>\n<td>Create customized display of different post formats like photos, quotes, posts, links, videos, and so on.</td>\n</tr>\n<tr>\n<td>Custom Fields</td>\n<td>Use custom fields to attach different post metadata to individual posts and pages, like your current mood, what you&#8217;re currently listening to or your current local weather.</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"WordPress resources","thumb":null,"image":null,"content":"<p>If you use WordPress as the platform for your blog or website, you can make use of any or all of the many tools WordPress offers. Tap into some solid information from WordPress user forums, get ideas for themes, and boost your WordPress knowledge.</p>\n<table>\n<tbody>\n<tr>\n<td width=\"249\">Name</td>\n<td width=\"480\">Description</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.org/plugins/\" target=\"_blank\" rel=\"noopener\">WordPress Plugins</a></td>\n<td width=\"480\">Offers thousands of downloads that let you do almost anything you can imagine — and you can imagine quite a lot, can&#8217;t you?</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.org/themes\" target=\"_blank\" rel=\"noopener\">WordPress Themes</a></td>\n<td width=\"480\">Lets you choose from hundreds of themes to manage the look and functionality of your home page.</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.org/documentation/\" target=\"_blank\" rel=\"noopener\">WordPress Documentation</a></td>\n<td width=\"480\">Use WordPress Documentation to tap into the encyclopedia of WordPress knowledge.</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.org/news/\" target=\"_blank\" rel=\"noopener\">WordPress News &amp; Updates</a></td>\n<td width=\"480\">This section of the official WordPress website gives you the latest news and notes on all things WordPress.</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.com/forums/\" target=\"_blank\" rel=\"noopener\">Support Forums for WordPress.com</a></td>\n<td width=\"480\">Lets you post questions, answers, and comments for other WordPress users who are using the hosted/commercial version of WordPress.com.</td>\n</tr>\n<tr>\n<td width=\"249\"><a href=\"https://wordpress.org/support/forums/\" target=\"_blank\" rel=\"noopener\">Support Forums for WordPress.org</a></td>\n<td width=\"480\">Post your questions and obtain answers from the vast WordPress community for users of the self-hosted WordPress.org software.</td>\n</tr>\n</tbody>\n</table>\n"},{"title":"Designing a website with WordPress designers","thumb":null,"image":null,"content":"<p>Turn to WordPress designers if you need help designing your website. The look and feel of your website are critical to its success, so take your time when choosing themes, color, and layout. If you&#8217;re looking for a cool theme, or someone to add pizzazz to your site through design, you want that person to know your WordPress platform. These designers fit the bill.</p>\n<table width=\"67%\">\n<tbody>\n<tr>\n<td width=\"47%\"><strong>Name / URL</strong></td>\n<td width=\"52%\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"47%\"><a href=\"https://webdevstudios.com/\" target=\"_blank\" rel=\"noopener\">WebDevStudios</a></td>\n<td width=\"52%\">Cutting edge, custom WordPress design and development</td>\n</tr>\n<tr>\n<td width=\"47%\"><a href=\"https://freshysites.com/\" target=\"_blank\" rel=\"noopener\">Freshy Sites</a></td>\n<td width=\"52%\">WordPress web design services</td>\n</tr>\n<tr>\n<td width=\"47%\"><a href=\"https://www.kadencewp.com/\" target=\"_blank\" rel=\"noopener\">KadenceWP</a></td>\n<td width=\"52%\">Purchase and download easy-to-use WordPress premium themes.</td>\n</tr>\n<tr>\n<td width=\"47%\"><a href=\"https://greenbay.digital/\" target=\"_blank\" rel=\"noopener\">GB Digital</a></td>\n<td width=\"52%\">Custom WordPress design and development for small businesses and organizations</td>\n</tr>\n</tbody>\n</table>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2022-03-02T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":207989},{"headers":{"creationTime":"2018-03-13T01:35:22+00:00","modifiedTime":"2024-01-05T20:44:23+00:00","timestamp":"2024-01-05T21:01:13+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"Web Coding and Development All-in-One For Dummies Cheat Sheet","strippedTitle":"web coding and development all-in-one for dummies cheat sheet","slug":"web-coding-development-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"One of the handiest features of web coding and development is that once you’ve learned a few basics, you can apply those basics to any project. A good example i","noIndex":0,"noFollow":0},"content":"One of the handiest features of web coding and development is that once you’ve learned a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project. It’s also worth your time to learn how selectors work, because you use them to save you time both when you’re writing CSS rules and when you’re writing JavaScript code. Errors, too, are a fact of web coding life, so understanding the most common errors can help you debug your code faster and get back to more creative pursuits.","description":"One of the handiest features of web coding and development is that once you’ve learned a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project. It’s also worth your time to learn how selectors work, because you use them to save you time both when you’re writing CSS rules and when you’re writing JavaScript code. Errors, too, are a fact of web coding life, so understanding the most common errors can help you debug your code faster and get back to more creative pursuits.","blurb":"","authors":[{"authorId":11290,"name":"Paul McFedries","slug":"paul-mcfedries","description":" <p><b>Paul McFedries</b> is a technical writer who has been authoring computer books since 1991 and has over 100 books to his credit. These books include <i>Alexa For Dummies, Amazon Fire TV For Dummies</i>, and <i>Cord Cutting For Dummies</i>. You can visit Paul on the web at www.mcfedries.com.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/11290"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":254314,"title":"Working with Images in a Mobile App","slug":"working-images-mobile-app","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/254314"}},{"articleId":254311,"title":"Going Mobile Faster with jQuery Mobile","slug":"going-mobile-faster-jquery-mobile","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/254311"}},{"articleId":254308,"title":"What Is Mobile-First Web Development?","slug":"mobile-first-web-development","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/254308"}},{"articleId":254305,"title":"Setting Up the Back End to Handle Users","slug":"setting-back-end-handle-users","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/254305"}},{"articleId":254302,"title":"Creating the App Startup Files for Your Web App","slug":"creating-app-startup-files-web-app","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/254302"}}],"fromCategory":[{"articleId":299575,"title":"HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet","slug":"html-css-javascript-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/299575"}},{"articleId":265680,"title":"Using DevOps To Improve Engineering","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"How To Automate DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"How To Choose a Cloud Service Provider for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281889,"slug":"web-coding-development-all-in-one-for-dummies","isbn":"9781394197026","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1394197020/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1394197020/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1394197020-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1394197020/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1394197020/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/web-coding-and-development-all-in-one-for-dummies-cover-9781394197026-203x255.jpg","width":203,"height":255},"title":"Web Coding & Development All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><b><b data-author-id=\"11290\">Paul McFedries</b></b> is a technical writer who has been authoring computer books since 1991 and has over 100 books to his credit. These books include <i>Alexa For Dummies, Amazon Fire TV For Dummies</i>, and <i>Cord Cutting For Dummies</i>. You can visit Paul on the web at www.mcfedries.com.</p>","authors":[{"authorId":11290,"name":"Paul McFedries","slug":"paul-mcfedries","description":" <p><b>Paul McFedries</b> is a technical writer who has been authoring computer books since 1991 and has over 100 books to his credit. These books include <i>Alexa For Dummies, Amazon Fire TV For Dummies</i>, and <i>Cord Cutting For Dummies</i>. You can visit Paul on the web at www.mcfedries.com.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/11290"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394197026&quot;]}]\" id=\"du-slot-65986e19e535e\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394197026&quot;]}]\" id=\"du-slot-65986e19e5c25\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":250699,"title":"Your Web Development Template","slug":"web-development-template","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250699"}},{"articleId":250696,"title":"4 Selectors in CSS and jQuery","slug":"4-selectors-css-jquery","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250696"}},{"articleId":250693,"title":"Top 10 JavaScript Errors","slug":"top-10-javascript-errors","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/250693"}}],"content":[{"title":"Your Web Development Template","thumb":null,"image":null,"content":"<p>All web pages start out with the same basic HTML structure, so you can get any new web development project off on the right foot by first laying down that foundation. You can do this most easily by creating a template file that you can copy for each new web coding project. Here are the HTML tags to add to your template:</p>\n<pre class=\"code\">&lt;!DOCTYPE html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n&lt;head&gt;\r\n &lt;meta charset=\"utf-8\"&gt;\r\n &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n &lt;title&gt;&lt;/title&gt;\r\n &lt;link href=\"styles.css\" rel=\"stylesheet\"&gt;\r\n &lt;script src=\"code.js\" defer&gt;&lt;/script&gt;\r\n&lt;/head&gt;\r\n&lt;body&gt;\r\n &lt;header&gt;\r\n &lt;/header&gt;\r\n &lt;nav&gt;\r\n &lt;/nav&gt;\r\n &lt;main&gt;\r\n &lt;article&gt;\r\n &lt;/article&gt;\r\n &lt;aside&gt;\r\n &lt;/aside&gt;\r\n &lt;/main&gt;\r\n &lt;footer&gt;\r\n &lt;/footer&gt;\r\n&lt;/body&gt;\r\n&lt;/html&gt;\r\n</pre>\n<p class=\"article-tips remember\">For the <code>&lt;link&gt;</code> and <code>&lt;script&gt;</code> tags, be sure to adjust the filenames as needed, and be sure to add the path to each file if you’ve stored the files in subdirectories.</p>\n"},{"title":"Selectors in CSS and JavaScript","thumb":null,"image":null,"content":"<p>Both CSS and JavaScript save you oodles of time by making it easy to format and program page elements. These two technologies become even more powerful when you use selectors to specify which elements you want to work with:</p>\n<p>* <strong>The class selector:</strong> If you’ve use the <code>class</code> attribute to assign a class name to one or more page elements, you can target those elements by using a <em>class selector</em>:</p>\n<p>HTML:</p>\n<pre class=\"code\">&lt;<em>element</em> class=\"<em>class-name</em>\"&gt;</pre>\n<p>CSS:</p>\n<pre class=\"code\">.<em>class-name</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\n etc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('.<em>class-name</em>')</pre>\n<p>or:</p>\n<pre class=\"code\">document.querySelectorAll('.<em>class-name</em>')</pre>\n<p>* <strong>The id selector:</strong> If you’ve use the <code>id</code> attribute to assign an ID to a page element, you can target that element by using an <em>id selector</em>:</p>\n<p>HTML:</p>\n<pre class=\"code\">&lt;<em>element</em> id=\"<em>id-name</em>\"&gt;</pre>\n<p>CSS:</p>\n<pre class=\"code\">#<em>id-name</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\n etc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('#<em>id-name</em>')</pre>\n<p>* <strong>The descendant combinator:</strong> To target every element that is contained in (that is, is a descendant of) a specified ancestor element, use the <em>descendant combinator</em> (a space):</p>\n<p>CSS:</p>\n<pre class=\"code\"><em>ancestor</em> <em>descendant</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\n etc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('<em>ancestor</em> <em>descendant</em>')</pre>\n<p>or:</p>\n<pre class=\"code\">document.querySelectorAll('<em>ancestor</em> <em>descendant</em>')</pre>\n<p>* <strong>The child combinator:</strong> To target every element that resides one level below (that is, is a child of) a specified parent element, use the <em>child combinator</em>:</p>\n<p>CSS:</p>\n<pre class=\"code\"><em>parent</em> &gt; <em>child</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\netc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('<em>parent &gt; child</em>')</pre>\n<p>or:</p>\n<pre class=\"code\">document.querySelectorAll('<em>parent &gt; child</em>')</pre>\n<p>* <strong>The subsequent-sibling combinator:</strong> To target every element that appears in the HTML after a specified reference element and is a sibling of that element, use the <em>subsequent-sibling combinator</em>:</p>\n<p>CSS:</p>\n<pre class=\"code\"><em>reference </em>~<em> target</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\n etc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('<em>reference ~ target</em>)</pre>\n<p>or:</p>\n<pre class=\"code\">document.querySelectorAll('<em>reference ~ target</em>')</pre>\n<p>* <strong>The next-sibling combinator:</strong> To target the next sibling that comes after a reference element, use the <em>next-sibling combinator</em>:</p>\n<p>CSS:</p>\n<pre class=\"code\"><em>reference </em>+<em> target</em> {\r\n\r\n <em>property1</em>: <em>value1</em>;\r\n\r\n <em>property2</em>: <em>value2</em>;\r\n\r\n etc.\r\n\r\n}</pre>\n<p>JavaScript:</p>\n<pre class=\"code\">document.querySelector('<em>reference </em>+<em> target</em>')</pre>\n<p>or:</p>\n<pre class=\"code\">document.querySelectorAll('<em>reference </em>+<em> target</em>')</pre>\n"},{"title":"Top 10 JavaScript Errors","thumb":null,"image":null,"content":"<p>When you encounter a script problem, the first thing you should do is examine your code for the most common errors. To help you do that, here’s a list of the 10 most common errors made by both beginning and experienced programmers:</p>\n<ul>\n<li><strong>JavaScript keywords as variable names:</strong> JavaScript has many reserved words and keywords built into the language, so it’s common to accidentally use one of these words as a variable or function name. Double-check your names to make sure you’re not using any reserved words or the names of any objects, properties, or methods.</li>\n<li><strong>Misspelled variables and other names:</strong> Check your variable and function names to make sure you spell them consistently throughout the script. Also, check the spelling of the objects, properties, and methods you use.</li>\n<li><strong>Misused uppercase and lowercase letters:</strong> JavaScript is a <em>case-sensitive</em> language, which means that it treats each letter differently depending on whether it’s uppercase or lowercase. For example, consider the following two statements:\n<pre class=\"code\">const firstName = \"Millicent\";\r\nconst message = \"Welcome \" + firstname;\r\n</pre>\n<p>The first statement declares a variable named <code>firstName</code>, but the second statement uses <code>firstname</code>. This code would generate the error <code>firstname is not defined</code> (or something similar, depending on the browser) because to JavaScript, <code>firstname</code> is a different (and uninitialized) variable.</li>\n<li><strong>Mismatched quotation marks:</strong> In any statement where you began a string literal with a quotation mark (<code>\"</code> or <code>'</code>), always check to make sure that you included the corresponding closing quotation mark at the end of the string. Also, check to see if you used one or more instances of the same quotation mark within the string. If so, edit the string to use the proper escape sequence (<code>\\\"</code> or <code>\\'</code>), instead:\n<pre class=\"code\">// Bad\r\nconst myString = \"There are no \"bad\" programs.\";\r\n\t\r\n// Better\r\nconst myString = \"There are no \\\"bad\\\" programs.\";\r\n\r\n// Best\r\nconst myString = `There are no \"bad\" programs.`;</pre>\n</li>\n<li><strong>Mismatched parentheses:</strong> Look for statements that contain a left parenthesis — <code>(</code> — and make sure there’s a corresponding right parentheses — <code>)</code>. This also applies to square brackets — <code>[</code> and <code>]</code>.\n<p class=\"article-tips tip\">For complex expressions that include three or more sets of parentheses, a quick match-up check is to count the number of left parentheses in the expression, and then count the number of right parentheses. If these numbers don’t match, then you know you have a mismatch somewhere in the expression.</p>\n</li>\n<li><strong>Missed parentheses after function names:</strong> Speaking of parentheses, if your script calls a function or method that doesn’t take any arguments, check that you included the parentheses — <code>( )</code> — after the name of the function or method:\n<pre class=\"code\">function tryThis() {\r\n alert(\"Parentheses travel in pairs!\");\r\n}\r\n\r\n// This won't work\r\ntryThis;\r\n\r\n// This will\r\ntryThis();</pre>\n</li>\n<li><strong>Improper use of braces:</strong> JavaScript uses braces to mark the start (<code>{</code>) and end (<code>}</code>) of statement blocks associated with functions, tests involving <code>if()</code> and <code>switch()</code>, and loops, including <code>for()</code>, <code>while()</code>, and <code>do...while()</code>. It’s very easy to miss one or both braces in a block, and it’s even easier to get the braces mixed up when nesting one test or loop inside another. Double-check your braces to make sure each block has both an opening and a closing brace.\n<p class=\"article-tips tip\">One way to ensure that you don’t miss any braces is to position them consistently throughout your script. For example, many people prefer to use the traditional style for brace positions:</p>\n<pre class=\"code\">keyword {\r\n statements\r\n}</pre>\n<p>(Here, <em><code>keyword</code> </em>means the statement — such as function or <code>if()</code> — that defines the block.) If you prefer this style, use it all through your script so that you know exactly where to look for each brace.</p>\n<p>An easy way to ensure that you never forget a closing brace is to enter it immediately after entering the opening brace. That is, you type <code>{</code>, press Enter twice, and then type <code>}</code>.</p>\n<p>Also, use indentation consistently for the statements within the block. This makes it much easier to see the braces, particularly when you have one block nested within another.</li>\n<li><strong>Using <code>=</code> or <code>==</code> instead of <code>===</code>:</strong> The identity operator (<code>===</code>) is one of the least intuitive JavaScript features because the assignment operator (<code>=</code>) feels so much more natural. The equality operator (<code>==</code>) can cause problems because it often converts the data types before making the comparison. Therefore, check all your comparison expressions to make sure you always use <code>===</code> instead of <code>=</code> or <code>==</code>.</li>\n<li><strong>Conflicts between local and global variables</strong><strong>:</strong> A global variable is available throughout the entire page, even within functions. So, within a function, make sure that you don’t declare and use a variable that has the same name as a global variable.</li>\n<li><strong>The use of a page element before it’s loaded</strong><strong>:</strong> JavaScript runs through a page’s HTML one line at a time and checks the syntax of each JavaScript statement as it comes to it. If your code refers to an element (such as a form field) that JavaScript hasn’t come to yet, it generates an error. Therefore, if your code deals with an element, always place the script after the element in the HTML file.</li>\n</ul>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2024-01-05T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":250703},{"headers":{"creationTime":"2016-03-27T16:51:46+00:00","modifiedTime":"2023-11-13T14:37:39+00:00","timestamp":"2023-11-13T15:01:10+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"Building Websites All-in-One For Dummies Cheat Sheet","strippedTitle":"building websites all-in-one for dummies cheat sheet","slug":"building-websites-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Note: The following cheat sheet is from Building Websites All-in-One For Dummies which published in 2012; therefore, this content may be outdated. For more curr","noIndex":1,"noFollow":0},"content":"Note: The following cheat sheet is from <em>Building Websites All-in-One For Dummies</em> which published in 2012; therefore, this content may be outdated. For more current information on website building, please see <a href=\"https://www.dummies.com/book/technology/programming-web-design/general-programming-web-design/html-css-javascript-all-in-one-for-dummies-299520/\">HTML, CSS, & JavaScript All-in-One For Dummies</a>.\r\n\r\nWhether complex or simple, websites require that you make decisions — such as color, theme, and tone — and that you juggle many pieces of the project — like code, style sheets, and graphics. Knowing which resources to turn to for help implementing HTML5, and a few key points about incorporating graphics and video, can help you.","description":"Note: The following cheat sheet is from <em>Building Websites All-in-One For Dummies</em> which published in 2012; therefore, this content may be outdated. For more current information on website building, please see <a href=\"https://www.dummies.com/book/technology/programming-web-design/general-programming-web-design/html-css-javascript-all-in-one-for-dummies-299520/\">HTML, CSS, & JavaScript All-in-One For Dummies</a>.\r\n\r\nWhether complex or simple, websites require that you make decisions — such as color, theme, and tone — and that you juggle many pieces of the project — like code, style sheets, and graphics. Knowing which resources to turn to for help implementing HTML5, and a few key points about incorporating graphics and video, can help you.","blurb":"","authors":[{"authorId":9574,"name":"David Karlins","slug":"david-karlins","description":" <p>David Karlins is a web design professional and author who's written over 50 books and created video training on top web design tools. Doug Sahlin is the coauthor of <i>Social Media Marketing All-in-One For Dummies</i> and author of <i>Digital Landscape &amp; Nature Photography For Dummies</i>.</p>","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9574"}},{"authorId":9229,"name":"Doug Sahlin","slug":"doug-sahlin","description":" <p><b>Joe Hutsko</b> has been writing about computers, gadgets, and video games for over 20 years. <b>Barbara Boyd</b> is coauthor with Joe of three editions of <i>iPhone All&#45;in&#45;One For Dummies</i>. <b>Jesse Feiler</b> writes apps and books about building and using apps. <b>Doug Sahlin</b> is the author of more than 20 how&#45;to books, many of them bestsellers. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9229"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[],"fromCategory":[{"articleId":299575,"title":"HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet","slug":"html-css-javascript-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/299575"}},{"articleId":265680,"title":"Using DevOps To Improve Engineering","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"How To Automate DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"How To Choose a Cloud Service Provider for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":292544,"slug":"building-websites-all-in-one-for-dummies","isbn":"9781118270035","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1118270037/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1118270037/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1118270037-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1118270037/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1118270037/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/building-websites-all-in-one-for-dummies-book-cover-9781118270035-202x255.jpg","width":202,"height":255},"title":"Building Websites All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p>David Karlins is a web design professional and author who's written over 50 books and created video training on top web design tools. Doug Sahlin is the coauthor of <i>Social Media Marketing All-in-One For Dummies</i> and author of <i>Digital Landscape &amp; Nature Photography For Dummies</i>.</p>","authors":[{"authorId":9574,"name":"David Karlins","slug":"david-karlins","description":" <p>David Karlins is a web design professional and author who's written over 50 books and created video training on top web design tools. Doug Sahlin is the coauthor of <i>Social Media Marketing All-in-One For Dummies</i> and author of <i>Digital Landscape &amp; Nature Photography For Dummies</i>.</p>","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9574"}},{"authorId":9229,"name":"Doug Sahlin","slug":"doug-sahlin","description":" <p><b>Joe Hutsko</b> has been writing about computers, gadgets, and video games for over 20 years. <b>Barbara Boyd</b> is coauthor with Joe of three editions of <i>iPhone All&#45;in&#45;One For Dummies</i>. <b>Jesse Feiler</b> writes apps and books about building and using apps. <b>Doug Sahlin</b> is the author of more than 20 how&#45;to books, many of them bestsellers. ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9229"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118270035&quot;]}]\" id=\"du-slot-65523a3778476\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118270035&quot;]}]\" id=\"du-slot-65523a377a165\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":174684,"title":"Online Resources for Building Websites","slug":"online-resources-for-building-websites","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/174684"}},{"articleId":174683,"title":"Reminders for Preparing Web Graphics and Video","slug":"reminders-for-preparing-web-graphics-and-video","categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/174683"}}],"content":[{"title":"Online Resources for Building Websites","thumb":null,"image":null,"content":"<p>Amidst all the clutter on the web lie valuable free online resources for building essential elements of an inviting and accessible website. So that you don’t have to sift through the clutter, here are some of the best.</p>\n<p><a href=\"https://www.w3schools.com/\">W3schools.com</a> provides the most extensive online library of code resources, but that library can be overwhelming. The following links take you to some useful landing points to get started:</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\">Instructions on <a href=\"https://www.w3schools.com/html/\">creating a basic HTML page</a></p>\n</li>\n<li>\n<p class=\"first-para\">Tutorials on building <a href=\"https://www.w3schools.com/html/html_css.asp\">inline, internal, and external CSS</a></p>\n</li>\n<li>\n<p class=\"first-para\">Basic <a href=\"https://www.w3schools.com/css/css_howto.asp\">CSS parameters, syntax, and instructions</a> for adding CSS to web pages</p>\n</li>\n</ul>\n"},{"title":"Reminders for Preparing Web Graphics and Video","thumb":null,"image":null,"content":"<p>Websites without graphics are almost non-existent these days. When you create graphics, optimize images, or prepare video for a website, the results have to be sharp, detailed, and fast loading. Three popular forms of graphics you use on a website are photo-realistic images, images such as logos with large areas of solid color, and images that are a combination of images and text. Here are some friendly reminders for creating and optimizing graphics for websites:</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\"><b></b>Optimize photo-realistic images using the JPEG format.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>Optimize images with large areas of solid color using the GIF format.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>When optimizing graphics that have text overlaid on a photorealistic image, create separate slices for the areas of the image that are photorealistic, and create additional slices for the areas of the image that contain text. Export the areas containing text using the GIF format, and export the photo-realistic areas of the image using the JPEG format.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>For high quality JPEG images, use a quality setting of 70 when exporting. For smaller JPEG images, you can get by with a quality setting of 50.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>If you’re creating a photo gallery for a product, or for a photographer, export the images in the JPEG format with a quality setting of 80.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>When compressing images using the JPEG format, pay careful attention to the edges of objects in the image. When you begin to see pixels, or the edges lack definition, you’ve compressed the image too far.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>When exporting images using the GIF file format, use the least number of colors that yields a crisp image and you’ll have a fast loading image.</p>\n</li>\n<li>\n<p class=\"first-para\"><b></b>When you resample images for websites, the maximum resolution you need is 72 pixels per inch.</p>\n</li>\n</ul>\n<p>Websites with no video are becoming rarer. Video is everywhere on the Internet: for entertainment, in ads, to promote rock stars and other artists. When video is well done, it’s a thing of beauty. However there are some things you need to consider when adding video to a web page:</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\"><b>Video takes up lots of bandwith. </b>If the bandwidth for a website is exceeded, the charge can be rather costly. Instead of hosting video on a website, upload it to YouTube, and then embed the video in a webpage or blog.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Don’t violate copyright laws. </b>Don’t copy video from other websites, or other people’s YouTube videos and use them on your website.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Check the license: </b>If you do use a video from a supplier or manufacturer on a commercial website, make sure you are covered by the supplier or manufacturer’s license.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Use a high quality camcorder to record video: </b>No, an iPhone is not a high quality camcorder. If you encode poor quality video for the web, you get poor quality video. Remember the old axiom: Garbage in, garbage out.</p>\n</li>\n<li>\n<p class=\"first-para\"><b>Make sure the website viewers have the necessary plug-ins to view the video. </b></p>\n</li>\n<li>\n<p class=\"first-para\"><b>If you create HTML5 pages with video, make sure the intended audience for the site uses HTML5-compliant browsers.</b></p>\n</li>\n<li>\n<p class=\"first-para\"><b>Don’t use transitions when you edit multiple video clips to create a video for the web.</b> Video transitions look great on HD video, but don’t look good when you encode a video for the web.</p>\n</li>\n</ul>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Six months","lifeExpectancySetFrom":"2023-11-08T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":208262},{"headers":{"creationTime":"2016-03-26T07:30:05+00:00","modifiedTime":"2023-10-04T12:49:14+00:00","timestamp":"2023-10-04T15:01:02+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"slug":"python","categoryId":33606}],"title":"Python 2.7 Keyword Subset and Examples","strippedTitle":"python 2.7 keyword subset and examples","slug":"python-2-7-keyword-subset-and-examples","canonicalUrl":"","seo":{"metaDescription":"Programming is an important skill. Python will serve you well for years to come. The tables here give you the core words, built-ins, standard library functions,","noIndex":0,"noFollow":0},"content":"<p>Programming is an important skill. Python will serve you well for years to come. The tables here give you the core words, built-ins, standard library functions, and operators that you'll use most when you're coding with Python.</p>\r\n<h2 id=\"tab1\" >Python Core Words</h2>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<th>Keyword</th><th>Summary</th><th>Example</th>\r\n</tr>\r\n<tr>\r\n<td>and</td>\r\n<td>Logical operator to test whether two things are both <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\"><em><conditional expression> </em><span style=\"font-family: Verdana;\">and</span></span><br /><span class=\"code\"><em><conditional expression></em></span><br /><span class=\"code\">x>2 and x<10</span></td>\r\n</tr>\r\n<tr>\r\n<td>as</td>\r\n<td>Assign a file object to a variable. Used with <span class=\"code\">with</span>.<br />Let your code refer to a module under a different name (also called an <em>alias</em>). Used with <span class=\"code\">import</span>.</td>\r\n<td><span class=\"code\">with open(<</span><span class=\"code\"><em>name of file</em></span><span class=\"code\">>,<</span><span class=\"code\"><em>file mode</em></span><span class=\"code\">>) as <</span><span class=\"code\"><em>object name</em></span><span class=\"code\">>:</span><span class=\"code\"><br /></span><span class=\"code\">import cPickle as pickle</span></td>\r\n</tr>\r\n<tr>\r\n<td>break</td>\r\n<td>Stop execution of a loop.</td>\r\n<td><span class=\"code\">for i in range(10):</span><br /><span class=\"code\"> if i%2 ==0:</span><br /><span class=\"code\"> break</span></td>\r\n</tr>\r\n<tr>\r\n<td>class</td>\r\n<td>Define a custom object.</td>\r\n<td><span class=\"code\">class <</span><span class=\"code\"><em>name of class</em></span><span class=\"code\">>(object):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"<em>Your docstring</em>\"\"</span> <br /><span class=\"code\">class MyClass(object):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"A cool function.\"\"</span><br /></td>\r\n</tr>\r\n<tr>\r\n<td>continue</td>\r\n<td>Skip balance of loop and begin a new iteration.</td>\r\n<td><span class=\"code\">for i in range(10):</span><br /><span class=\"code\"> if i%2 ==0:</span><br /><span class=\"code\"> continue</span></td>\r\n</tr>\r\n<tr>\r\n<td>def</td>\r\n<td>Define a function.</td>\r\n<td><span class=\"code\">def <</span><span class=\"code\"><em>name of function</em></span><span class=\"code\">>(<argument list>):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"<em>Your docstring</em>\"\"</span> <span class=\"code\"><br /></span><span class=\"code\">def my_function():</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"This does... \"\"</span></td>\r\n</tr>\r\n<tr>\r\n<td>elif</td>\r\n<td>Add conditional test to an <span class=\"code\">if</span> clause.</td>\r\n<td>See <span class=\"code\">if</span>.</td>\r\n</tr>\r\n<tr>\r\n<td>else</td>\r\n<td>Add an alternative code block.</td>\r\n<td>See <span class=\"code\">if</span>.</td>\r\n</tr>\r\n<tr>\r\n<td>for</td>\r\n<td>Create a loop which iterates through elements of a list (or other iterable).</td>\r\n<td><span class=\"code\">for <</span><span class=\"code\"><em>dummy variable name</em></span><span class=\"code\">> in <</span><span class=\"code\"><em>sequence</em></span><span class=\"code\">>:</span><span class=\"code\"><br /></span><span class=\"code\">for i in range(10):</span></td>\r\n</tr>\r\n<tr>\r\n<td>from</td>\r\n<td>Import specific functions from a module without importing the whole module.</td>\r\n<td><span class=\"code\">from <</span><span class=\"code\"><em>module name</em></span><span class=\"code\">> import <</span><span class=\"code\"><em>name of function or object</em></span><span class=\"code\">></span><span class=\"code\"><br /></span><span class=\"code\">from random import randint</span></td>\r\n</tr>\r\n<tr>\r\n<td>global</td>\r\n<td>Make a variable global in scope. (If a variable is defined in the main section, you can change its value within a function.)</td>\r\n<td><span class=\"code\">global x</span></td>\r\n</tr>\r\n<tr>\r\n<td>if</td>\r\n<td>Create a condition. If the condition is <span class=\"code\">True</span>, the associated code block is executed. Otherwise, any <span class=\"code\">elif</span> commands are processed. If there are none, or none are satisfied, execute the <span class=\"code\">else</span> block if there is one.</td>\r\n<td><span class=\"code\">if <em><conditional expression></em>:</span><br /><span class=\"code\"><em> <code block></em></span><br /><span class=\"code\">[elif <conditional expression>:</span><br /><span class=\"code\"> <code block>, ...]</span><br /><span class=\"code\">[else:</span><br /><span class=\"code\"> <code block>]</span><br /><span class=\"code\">if x == 1:</span><br /><span class=\"code\"> print(\"x is 1\")</span><br /><span class=\"code\">elif x == 2:</span><br /><span class=\"code\"> print(\"x is 2\")</span><br /><span class=\"code\">elif x > 3:</span><br /><span class=\"code\"> print(\"x is greater than 3\")</span><br /><span class=\"code\">else</span><br /><span class=\"code\"> print(\"x is not greater than 3, nor is it 1 one or 2\")</span></td>\r\n</tr>\r\n<tr>\r\n<td>import</td>\r\n<td>Use code defined in another file without retyping it.</td>\r\n<td><span class=\"code\">import <</span><span class=\"code\"><em>name of module</em></span><span class=\"code\">></span><span class=\"code\"><br /></span><span class=\"code\">import random</span></td>\r\n</tr>\r\n<tr>\r\n<td>in</td>\r\n<td>Used to test whether a given value is one of the elements of an object.</td>\r\n<td><span class=\"code\">1 in range(10)</span></td>\r\n</tr>\r\n<tr>\r\n<td>is</td>\r\n<td>Used to test whether names reference the same object.</td>\r\n<td><span class=\"code\">x = None</span><br /><span class=\"code\">x is None # faster than</span><br /><span class=\"code\">x == None</span></td>\r\n</tr>\r\n<tr>\r\n<td>lambda</td>\r\n<td>Shorthand function definition. Usually used where a function needs to be passed as an argument to another function.</td>\r\n<td><span class=\"code\">lamda <em><dummy variables></em>:</span><br /><span class=\"code\"><em><expression using dummy variables></em></span><br /><span class=\"code\">times = lambda x, y: x*y</span><br /><span class=\"code\">command=lambda x: self.draw_line(self.control_points)</span></td>\r\n</tr>\r\n<tr>\r\n<td>not</td>\r\n<td>Logical negation, used to negate a logical condition. Don't use for testing greater than, less than, or equal.</td>\r\n<td><span class=\"code\">10 not in range(10)</span></td>\r\n</tr>\r\n<tr>\r\n<td>or</td>\r\n<td>Logical operator to test whether at least one of two things is <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\"><em><conditional expression></em> <span style=\"font-family: Verdana;\">or</span></span><br /><span class=\"code\"><em><conditional expression></em></span><br /><span class=\"code\">x<2 or x>10</span></td>\r\n</tr>\r\n<tr>\r\n<td>pass</td>\r\n<td>Placeholder keyword. Does nothing but stop Python complaining that a code block is empty.</td>\r\n<td><span class=\"code\">for i in range (10):</span><span class=\"code\"><br /></span><span class=\"code\"> pass</span></td>\r\n</tr>\r\n<tr>\r\n<td>print</td>\r\n<td>Output text to a terminal.</td>\r\n<td><span class=\"code\">print(</span><span class=\"code\">\"</span><span class=\"code\">Hello World!</span><span class=\"code\">\"</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>return</td>\r\n<td>Return from the execution of a function. If a value is specified, return that value, otherwise return <span class=\"code\">None</span>.</td>\r\n<td><span class=\"code\">return <value or expression></span><span class=\"code\"><br /></span><span class=\"code\">return x+2</span></td>\r\n</tr>\r\n<tr>\r\n<td>while</td>\r\n<td>Execute a code block while the associated condition is <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\">while <conditional expression>:</span><br /><span class=\"code\">while True:</span><br /><span class=\"code\"> pass</span></td>\r\n</tr>\r\n<tr>\r\n<td>with</td>\r\n<td>Get Python to manage a resource (like a file) for you.</td>\r\n<td><span class=\"code\">with open(<name of file>,<file mode>) as <object name>:</span></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Extend Python's core functionality with these built-ins.</p>\r\n<table border=\"0\">\r\n<caption>Python Built-ins </caption>\r\n<tbody>\r\n<tr>\r\n<th>Built-in</th><th>Notes</th><th>Example</th>\r\n</tr>\r\n<tr>\r\n<td>False</td>\r\n<td>Value, returned by a logical operation or directly assigned.</td>\r\n<td><span class=\"code\">ok_to_continue = False</span><br /><span class=\"code\">age = 16</span><br /><span class=\"code\">old_enough = age >=21</span><br />(evaluates comparison <span class=\"code\">age>=21</span> <br />and assigns the result to <span class=\"code\">old_enough)</span></td>\r\n</tr>\r\n<tr>\r\n<td>None</td>\r\n<td>Value used when representing the absence of a value or to initialise a variable which will be changed later. Returned by functions which do not explicitly return a value.</td>\r\n<td><span class=\"code\">x = None</span></td>\r\n</tr>\r\n<tr>\r\n<td>True</td>\r\n<td>Value, returned by a logical operation.</td>\r\n<td><span class=\"code\">ok_to_continue = True</span><br /><span class=\"code\">age = 16</span><br /><span class=\"code\">old_enough = age >=21</span><br />(evaluates comparison <span class=\"code\">age>=21</span> <br />and assigns the result to <span class=\"code\">old_enough)</span></td>\r\n</tr>\r\n<tr>\r\n<td>__name__</td>\r\n<td>Constant, shows module name. If it's not <span class=\"code\">\"</span><span class=\"code\">__</span><span class=\"code\">main</span><span class=\"code\">__</span><span class=\"code\">\"</span>, the code is being used in an import.</td>\r\n<td><span class=\"code\">if __name__==</span><span class=\"code\">\"</span><span class=\"code\">__main__</span><span class=\"code\">\"</span><span class=\"code\">:</span></td>\r\n</tr>\r\n<tr>\r\n<td>dir</td>\r\n<td>List attributes of an item.</td>\r\n<td><span class=\"code\">dir(<</span><span class=\"code\"><em>object name</em></span><span class=\"code\">>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>enumerate</td>\r\n<td>Iterate through a sequence and number each item.</td>\r\n<td><span class=\"code\">enumerate(</span><span class=\"code\">'</span><span class=\"code\">Hello</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>exit</td>\r\n<td>Exit Python (Command Line) interpreter.</td>\r\n<td><span class=\"code\">exit()</span></td>\r\n</tr>\r\n<tr>\r\n<td>float</td>\r\n<td>Convert a number into a decimal, usually so that division works properly.</td>\r\n<td><span class=\"code\">1/float(2)</span></td>\r\n</tr>\r\n<tr>\r\n<td>getattr</td>\r\n<td>Get an attribute of an object by a name. Useful for introspection.</td>\r\n<td><span class=\"code\">getattr(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>, <</span><span class=\"code\"><em>name of attribute</em></span><span class=\"code\">>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>help</td>\r\n<td>Get Python docstring on object.</td>\r\n<td><span class=\"code\">help(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>)</span><span class=\"code\"><br /></span><span class=\"code\">help(getattr)</span></td>\r\n</tr>\r\n<tr>\r\n<td>id</td>\r\n<td>Show the location in the computer's RAM where an object is stored.</td>\r\n<td><span class=\"code\">id(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>)</span><span class=\"code\"><br /></span><span class=\"code\">id(help)</span></td>\r\n</tr>\r\n<tr>\r\n<td>int</td>\r\n<td>Convert a string into an integer number.</td>\r\n<td><span class=\"code\">int(</span><span class=\"code\">'</span><span class=\"code\">0</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>len</td>\r\n<td>Get the number of elements in a sequence.</td>\r\n<td><span class=\"code\">len([0,1])</span></td>\r\n</tr>\r\n<tr>\r\n<td>object</td>\r\n<td>A base on which other classes can inherit from.</td>\r\n<td><span class=\"code\">class CustomObject(object):</span></td>\r\n</tr>\r\n<tr>\r\n<td>open</td>\r\n<td>Open a file on disk, return a file object.</td>\r\n<td><span class=\"code\">open(<path to file>, <mode>)</span><br /><span class=\"code\">open('mydatafile.txt', 'r') # read</span><br />(opens a file to read data from)<br /><span class=\"code\">open('mydatafile.txt', 'w') # write</span><br />(creates a new file to write to, destroys any existing file with the same name)<br /><span class=\"code\">open('mydatafile.txt', 'a') # append</span><br />(adds to an existing file if any, or creates<br />a new one if none existing already)</td>\r\n</tr>\r\n<tr>\r\n<td>print</td>\r\n<td>Reimplementation of <span class=\"code\">print</span> keyword, but as a function.<br />Need to import from the future to use it (srsly!)<br /></td>\r\n<td><span class=\"code\">from future import print_function</span><br /><span class=\"code\">print ('Hello World!</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>range</td>\r\n<td>Gives numbers between the lower and upper limits specified (including the lower, but excluding the upper limit). A step may be specified.</td>\r\n<td><span class=\"code\">range(10)</span><span class=\"code\"><br /></span><span class=\"code\">range(5,10)</span><span class=\"code\"><br /></span><span class=\"code\">range(1,10,2)</span></td>\r\n</tr>\r\n<tr>\r\n<td>raw_input</td>\r\n<td>Get some text as a string from the user, with an optional prompt.</td>\r\n<td><span class=\"code\">prompt =</span> <span class=\"code\">'</span><span class=\"code\">What is your guess?</span> <span class=\"code\">'</span><span class=\"code\"><br />players_guess = raw_input(prompt)</span></td>\r\n</tr>\r\n<tr>\r\n<td>str</td>\r\n<td>Convert an object (usually a number) into a string (usually for printing).</td>\r\n<td><span class=\"code\">str(0)</span></td>\r\n</tr>\r\n<tr>\r\n<td>type</td>\r\n<td>Give the type of the specified object.</td>\r\n<td><span class=\"code\">type(0)<br />type(</span><span class=\"code\">'</span><span class=\"code\">0</span><span class=\"code\">'</span><span class=\"code\">)<br />type([])<br />type({})<br />type(())</span></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Use the work that others have already done. Try these modules from the Python standard library.</p>\r\n<table border=\"0\">\r\n<caption>Selected Functions from the Standard Library </caption>\r\n<tbody>\r\n<tr>\r\n<th>Module</th><th>What It Does</th><th>Sample Functions/Objects</th>\r\n</tr>\r\n<tr>\r\n<td>os.path</td>\r\n<td>Functions relating to files and file paths.</td>\r\n<td><span class=\"code\">os.path.exists(<path to file>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>pickle, cPickle</td>\r\n<td>Save and load objects to/from a file.</td>\r\n<td><span class=\"code\">pickle.load(<file object to load from>),</span> <span class=\"code\">pickle.dump(<object to dump>, <file object to save to>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>random</td>\r\n<td>Various functions relating to random numbers.</td>\r\n<td><span class=\"code\">random.choice(<sequence to choose from>), random.randint(<lower limit>, <upper limit>), random.shuffle(<name of list to shuffle>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>String</td>\r\n<td>Stuff relating to strings.</td>\r\n<td><span class=\"code\">string.printable</span></td>\r\n</tr>\r\n<tr>\r\n<td>sys</td>\r\n<td>Various functions related to your computer system.</td>\r\n<td><span class=\"code\">sys.exit()</span></td>\r\n</tr>\r\n<tr>\r\n<td>Time</td>\r\n<td>Time-related functions.</td>\r\n<td><span class=\"code\">time.time()</span></td>\r\n</tr>\r\n<tr>\r\n<td>Tkinter</td>\r\n<td>User interface widgets and associated constants.</td>\r\n<td><span class=\"code\">Tkinter.ALL</span><br /><span class=\"code\">Tkinter.BOTH</span><br /><span class=\"code\">Tkinter.CENTER</span><br /><span class=\"code\">Tkinter.END</span><br /><span class=\"code\">Tkinter.HORIZONTAL</span><br /><span class=\"code\">Tkinter.LEFT</span><br /><span class=\"code\">Tkinter.NW</span><br /><span class=\"code\">Tkinter.RIGHT</span><br /><span class=\"code\">Tkinter.TOP</span><br /><span class=\"code\">Tkinter.Y</span><br /><span class=\"code\">Tkinter.Button(<parent widget>,</span><br /><span class=\"code\">text=<button text>)</span><br /><span class=\"code\">Tkinter.Canvas(<parent widget>,</span><br /><span class=\"code\"> width=<width>, height=<height>)</span><br /><span class=\"code\">Tkinter.Checkbutton(<parent widget>,</span><br /><span class=\"code\"> text=<checkbutton text>)</span><br /><span class=\"code\">Tkinter.Entry(<parent widget>,</span><br /><span class=\"code\"> width=<number of characters wide>),</span><br /><span class=\"code\">Tkinter.Frame(<parent widget>)</span><br /><span class=\"code\">Tkinter.IntVar()</span><br /><span class=\"code\">Tkinter.Label(<parent widget>,</span><br /><span class=\"code\"> text = <label text>)</span><br /><span class=\"code\">Tkinter.mainloop()</span><br /><span class=\"code\">Tkinter.Menu(<parent widget>)</span><br /><span class=\"code\">Tkinter.OptionMenu(<parent widget>,</span><br /><span class=\"code\"> None, None)</span><br /><span class=\"code\">Tkinter.Scale(<parent widget>,</span><br /><span class=\"code\"> from_=<lower limit>,</span><br /><span class=\"code\"> to=<upper limit>)</span><br /><span class=\"code\">Tkinter.Scrollbar(<parent widget>)</span><br /><span class=\"code\">Tkinter.StringVar()</span><br /><span class=\"code\">Tkinter.Tk()</span><br /></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Add, subtract, divide, multiply, and more using these operators.</p>\r\n<table border=\"0\">\r\n<caption>Python Operators </caption>\r\n<tbody>\r\n<tr>\r\n<th>Operator</th><th>Name</th><th>Effect</th><th>Examples</th>\r\n</tr>\r\n<tr>\r\n<td>+</td>\r\n<td>Plus</td>\r\n<td>Add two numbers.<br />Join two strings together.</td>\r\n<td>Add: <span class=\"code\">>>> 1+1</span><span class=\"code\"><br /></span><span class=\"code\">2</span><span class=\"code\"><br /></span>Join: <span class=\"code\">>>></span> <span class=\"code\">'</span><span class=\"code\">a</span><span class=\"code\">'</span><span class=\"code\">+</span><span class=\"code\">'</span><span class=\"code\">b</span><span class=\"code\">'</span><span class=\"code\"><br /></span><span class=\"code\">'</span><span class=\"code\">ab</span><span class=\"code\">'</span></td>\r\n</tr>\r\n<tr>\r\n<td>–</td>\r\n<td>Minus</td>\r\n<td>Subtract a number from another.<br />Can't use for strings.</td>\r\n<td><span class=\"code\">>>> 1-1</span><span class=\"code\"><br /></span><span class=\"code\">0</span></td>\r\n</tr>\r\n<tr>\r\n<td>*</td>\r\n<td>Times</td>\r\n<td>Multiply two numbers.<br />Make copies of a string.</td>\r\n<td>Multiply: <span class=\"code\">>>> 2*2</span><span class=\"code\"><br /></span><span class=\"code\">4</span><span class=\"code\"><br /></span>Copy: <span class=\"code\">>>></span> <span class=\"code\">'</span><span class=\"code\">a</span><span class=\"code\">'</span><span class=\"code\">*2</span><span class=\"code\"><br /></span><span class=\"code\">'</span><span class=\"code\">aa</span><span class=\"code\">'</span></td>\r\n</tr>\r\n<tr>\r\n<td>/</td>\r\n<td>Divide</td>\r\n<td>Divide one number by another.<br />Can't use for strings.</td>\r\n<td>1/2 # integer division:<br />Answer will be rounded down.<br />1/2.0 # decimal division<br />1/float(2) # decimal division<br /></td>\r\n</tr>\r\n<tr>\r\n<td>%</td>\r\n<td>Remainder (Modulo)</td>\r\n<td>Give the remainder when dividing the left number by the right number.<br />Formatting operator for strings.</td>\r\n<td><span class=\"code\">>>> 10%3</span><br /><span class=\"code\">1</span></td>\r\n</tr>\r\n<tr>\r\n<td>**</td>\r\n<td>Power</td>\r\n<td><span class=\"code\">x**y</span> means raise <span class=\"code\">x</span> to the power of <span class=\"code\">y</span>.<br />Can't use for strings.</td>\r\n<td><span class=\"code\">>>> 3**2</span><span class=\"code\"><br /></span><span class=\"code\">9</span></td>\r\n</tr>\r\n<tr>\r\n<td>=</td>\r\n<td>Assignment</td>\r\n<td>Assign the value on the right to the variable on the left.</td>\r\n<td><span class=\"code\">>>> a = 1</span></td>\r\n</tr>\r\n<tr>\r\n<td>==</td>\r\n<td>Equality</td>\r\n<td>Is the left side equal to the right side? Is <span class=\"code\">True</span> if so; is <span class=\"code\">False</span> otherwise.</td>\r\n<td><span class=\"code\">>>> 1 == 1</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> 'a' == 'a'</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>!=</td>\r\n<td>Not equal</td>\r\n<td>Is the left side <em>not</em> equal to the right side? Is <span class=\"code\">True</span> if so; is False otherwise.</td>\r\n<td><span class=\"code\">>>> 1 != 1</span><br /><span class=\"code\">False</span><br /><span class=\"code\">>>> 1 != 2</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> 'a' != 'a'</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>></td>\r\n<td>Greater than</td>\r\n<td>Is the left side greater than the right side?<br /><span class=\"code\">>=</span> means greater than or equal to</td>\r\n<td><span class=\"code\">>>> 2 > 1</span><span class=\"code\"><br /></span><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td><</td>\r\n<td>Less than</td>\r\n<td>Is the left side less than the right side?<br /><span class=\"code\"><=</span> means less than or equal to</td>\r\n<td><span class=\"code\">>>> 1 < 2</span><span class=\"code\"><br /></span><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>& (or and)</td>\r\n<td>And</td>\r\n<td>Are both left and right <span class=\"code\">True</span>?<br />Typically used for complex conditions where you want to do something if everything is <span class=\"code\">True</span>:<br /><span class=\"code\">while im_hungry and you_have_food:</span></td>\r\n<td><span class=\"code\">>>> True & True</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> True and False</span><br /><span class=\"code\">False </span><br /><span class=\"code\">>>> True & (1 == 2)</span><br /><span class=\"code\">False</span></td>\r\n</tr>\r\n<tr>\r\n<td>| (or or)</td>\r\n<td>Or</td>\r\n<td>Is either left or right <span class=\"code\">True</span>?<br />Typically used for complex conditions where you want at least one thing to be <span class=\"code\">True</span>:<br /><span class=\"code\">while im_bored or youre_bored:</span></td>\r\n<td><span class=\"code\">>>> True | False</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> True or False</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> False | False</span><br /><span class=\"code\">False</span><br /><span class=\"code\">>>> (1 == 1) | False</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n</tbody>\r\n</table>","description":"<p>Programming is an important skill. Python will serve you well for years to come. The tables here give you the core words, built-ins, standard library functions, and operators that you'll use most when you're coding with Python.</p>\r\n<h2 id=\"tab1\" >Python Core Words</h2>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<th>Keyword</th><th>Summary</th><th>Example</th>\r\n</tr>\r\n<tr>\r\n<td>and</td>\r\n<td>Logical operator to test whether two things are both <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\"><em><conditional expression> </em><span style=\"font-family: Verdana;\">and</span></span><br /><span class=\"code\"><em><conditional expression></em></span><br /><span class=\"code\">x>2 and x<10</span></td>\r\n</tr>\r\n<tr>\r\n<td>as</td>\r\n<td>Assign a file object to a variable. Used with <span class=\"code\">with</span>.<br />Let your code refer to a module under a different name (also called an <em>alias</em>). Used with <span class=\"code\">import</span>.</td>\r\n<td><span class=\"code\">with open(<</span><span class=\"code\"><em>name of file</em></span><span class=\"code\">>,<</span><span class=\"code\"><em>file mode</em></span><span class=\"code\">>) as <</span><span class=\"code\"><em>object name</em></span><span class=\"code\">>:</span><span class=\"code\"><br /></span><span class=\"code\">import cPickle as pickle</span></td>\r\n</tr>\r\n<tr>\r\n<td>break</td>\r\n<td>Stop execution of a loop.</td>\r\n<td><span class=\"code\">for i in range(10):</span><br /><span class=\"code\"> if i%2 ==0:</span><br /><span class=\"code\"> break</span></td>\r\n</tr>\r\n<tr>\r\n<td>class</td>\r\n<td>Define a custom object.</td>\r\n<td><span class=\"code\">class <</span><span class=\"code\"><em>name of class</em></span><span class=\"code\">>(object):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"<em>Your docstring</em>\"\"</span> <br /><span class=\"code\">class MyClass(object):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"A cool function.\"\"</span><br /></td>\r\n</tr>\r\n<tr>\r\n<td>continue</td>\r\n<td>Skip balance of loop and begin a new iteration.</td>\r\n<td><span class=\"code\">for i in range(10):</span><br /><span class=\"code\"> if i%2 ==0:</span><br /><span class=\"code\"> continue</span></td>\r\n</tr>\r\n<tr>\r\n<td>def</td>\r\n<td>Define a function.</td>\r\n<td><span class=\"code\">def <</span><span class=\"code\"><em>name of function</em></span><span class=\"code\">>(<argument list>):</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"<em>Your docstring</em>\"\"</span> <span class=\"code\"><br /></span><span class=\"code\">def my_function():</span><span class=\"code\"><br /></span><span class=\"code\"> \"\"This does... \"\"</span></td>\r\n</tr>\r\n<tr>\r\n<td>elif</td>\r\n<td>Add conditional test to an <span class=\"code\">if</span> clause.</td>\r\n<td>See <span class=\"code\">if</span>.</td>\r\n</tr>\r\n<tr>\r\n<td>else</td>\r\n<td>Add an alternative code block.</td>\r\n<td>See <span class=\"code\">if</span>.</td>\r\n</tr>\r\n<tr>\r\n<td>for</td>\r\n<td>Create a loop which iterates through elements of a list (or other iterable).</td>\r\n<td><span class=\"code\">for <</span><span class=\"code\"><em>dummy variable name</em></span><span class=\"code\">> in <</span><span class=\"code\"><em>sequence</em></span><span class=\"code\">>:</span><span class=\"code\"><br /></span><span class=\"code\">for i in range(10):</span></td>\r\n</tr>\r\n<tr>\r\n<td>from</td>\r\n<td>Import specific functions from a module without importing the whole module.</td>\r\n<td><span class=\"code\">from <</span><span class=\"code\"><em>module name</em></span><span class=\"code\">> import <</span><span class=\"code\"><em>name of function or object</em></span><span class=\"code\">></span><span class=\"code\"><br /></span><span class=\"code\">from random import randint</span></td>\r\n</tr>\r\n<tr>\r\n<td>global</td>\r\n<td>Make a variable global in scope. (If a variable is defined in the main section, you can change its value within a function.)</td>\r\n<td><span class=\"code\">global x</span></td>\r\n</tr>\r\n<tr>\r\n<td>if</td>\r\n<td>Create a condition. If the condition is <span class=\"code\">True</span>, the associated code block is executed. Otherwise, any <span class=\"code\">elif</span> commands are processed. If there are none, or none are satisfied, execute the <span class=\"code\">else</span> block if there is one.</td>\r\n<td><span class=\"code\">if <em><conditional expression></em>:</span><br /><span class=\"code\"><em> <code block></em></span><br /><span class=\"code\">[elif <conditional expression>:</span><br /><span class=\"code\"> <code block>, ...]</span><br /><span class=\"code\">[else:</span><br /><span class=\"code\"> <code block>]</span><br /><span class=\"code\">if x == 1:</span><br /><span class=\"code\"> print(\"x is 1\")</span><br /><span class=\"code\">elif x == 2:</span><br /><span class=\"code\"> print(\"x is 2\")</span><br /><span class=\"code\">elif x > 3:</span><br /><span class=\"code\"> print(\"x is greater than 3\")</span><br /><span class=\"code\">else</span><br /><span class=\"code\"> print(\"x is not greater than 3, nor is it 1 one or 2\")</span></td>\r\n</tr>\r\n<tr>\r\n<td>import</td>\r\n<td>Use code defined in another file without retyping it.</td>\r\n<td><span class=\"code\">import <</span><span class=\"code\"><em>name of module</em></span><span class=\"code\">></span><span class=\"code\"><br /></span><span class=\"code\">import random</span></td>\r\n</tr>\r\n<tr>\r\n<td>in</td>\r\n<td>Used to test whether a given value is one of the elements of an object.</td>\r\n<td><span class=\"code\">1 in range(10)</span></td>\r\n</tr>\r\n<tr>\r\n<td>is</td>\r\n<td>Used to test whether names reference the same object.</td>\r\n<td><span class=\"code\">x = None</span><br /><span class=\"code\">x is None # faster than</span><br /><span class=\"code\">x == None</span></td>\r\n</tr>\r\n<tr>\r\n<td>lambda</td>\r\n<td>Shorthand function definition. Usually used where a function needs to be passed as an argument to another function.</td>\r\n<td><span class=\"code\">lamda <em><dummy variables></em>:</span><br /><span class=\"code\"><em><expression using dummy variables></em></span><br /><span class=\"code\">times = lambda x, y: x*y</span><br /><span class=\"code\">command=lambda x: self.draw_line(self.control_points)</span></td>\r\n</tr>\r\n<tr>\r\n<td>not</td>\r\n<td>Logical negation, used to negate a logical condition. Don't use for testing greater than, less than, or equal.</td>\r\n<td><span class=\"code\">10 not in range(10)</span></td>\r\n</tr>\r\n<tr>\r\n<td>or</td>\r\n<td>Logical operator to test whether at least one of two things is <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\"><em><conditional expression></em> <span style=\"font-family: Verdana;\">or</span></span><br /><span class=\"code\"><em><conditional expression></em></span><br /><span class=\"code\">x<2 or x>10</span></td>\r\n</tr>\r\n<tr>\r\n<td>pass</td>\r\n<td>Placeholder keyword. Does nothing but stop Python complaining that a code block is empty.</td>\r\n<td><span class=\"code\">for i in range (10):</span><span class=\"code\"><br /></span><span class=\"code\"> pass</span></td>\r\n</tr>\r\n<tr>\r\n<td>print</td>\r\n<td>Output text to a terminal.</td>\r\n<td><span class=\"code\">print(</span><span class=\"code\">\"</span><span class=\"code\">Hello World!</span><span class=\"code\">\"</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>return</td>\r\n<td>Return from the execution of a function. If a value is specified, return that value, otherwise return <span class=\"code\">None</span>.</td>\r\n<td><span class=\"code\">return <value or expression></span><span class=\"code\"><br /></span><span class=\"code\">return x+2</span></td>\r\n</tr>\r\n<tr>\r\n<td>while</td>\r\n<td>Execute a code block while the associated condition is <span class=\"code\">True</span>.</td>\r\n<td><span class=\"code\">while <conditional expression>:</span><br /><span class=\"code\">while True:</span><br /><span class=\"code\"> pass</span></td>\r\n</tr>\r\n<tr>\r\n<td>with</td>\r\n<td>Get Python to manage a resource (like a file) for you.</td>\r\n<td><span class=\"code\">with open(<name of file>,<file mode>) as <object name>:</span></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Extend Python's core functionality with these built-ins.</p>\r\n<table border=\"0\">\r\n<caption>Python Built-ins </caption>\r\n<tbody>\r\n<tr>\r\n<th>Built-in</th><th>Notes</th><th>Example</th>\r\n</tr>\r\n<tr>\r\n<td>False</td>\r\n<td>Value, returned by a logical operation or directly assigned.</td>\r\n<td><span class=\"code\">ok_to_continue = False</span><br /><span class=\"code\">age = 16</span><br /><span class=\"code\">old_enough = age >=21</span><br />(evaluates comparison <span class=\"code\">age>=21</span> <br />and assigns the result to <span class=\"code\">old_enough)</span></td>\r\n</tr>\r\n<tr>\r\n<td>None</td>\r\n<td>Value used when representing the absence of a value or to initialise a variable which will be changed later. Returned by functions which do not explicitly return a value.</td>\r\n<td><span class=\"code\">x = None</span></td>\r\n</tr>\r\n<tr>\r\n<td>True</td>\r\n<td>Value, returned by a logical operation.</td>\r\n<td><span class=\"code\">ok_to_continue = True</span><br /><span class=\"code\">age = 16</span><br /><span class=\"code\">old_enough = age >=21</span><br />(evaluates comparison <span class=\"code\">age>=21</span> <br />and assigns the result to <span class=\"code\">old_enough)</span></td>\r\n</tr>\r\n<tr>\r\n<td>__name__</td>\r\n<td>Constant, shows module name. If it's not <span class=\"code\">\"</span><span class=\"code\">__</span><span class=\"code\">main</span><span class=\"code\">__</span><span class=\"code\">\"</span>, the code is being used in an import.</td>\r\n<td><span class=\"code\">if __name__==</span><span class=\"code\">\"</span><span class=\"code\">__main__</span><span class=\"code\">\"</span><span class=\"code\">:</span></td>\r\n</tr>\r\n<tr>\r\n<td>dir</td>\r\n<td>List attributes of an item.</td>\r\n<td><span class=\"code\">dir(<</span><span class=\"code\"><em>object name</em></span><span class=\"code\">>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>enumerate</td>\r\n<td>Iterate through a sequence and number each item.</td>\r\n<td><span class=\"code\">enumerate(</span><span class=\"code\">'</span><span class=\"code\">Hello</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>exit</td>\r\n<td>Exit Python (Command Line) interpreter.</td>\r\n<td><span class=\"code\">exit()</span></td>\r\n</tr>\r\n<tr>\r\n<td>float</td>\r\n<td>Convert a number into a decimal, usually so that division works properly.</td>\r\n<td><span class=\"code\">1/float(2)</span></td>\r\n</tr>\r\n<tr>\r\n<td>getattr</td>\r\n<td>Get an attribute of an object by a name. Useful for introspection.</td>\r\n<td><span class=\"code\">getattr(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>, <</span><span class=\"code\"><em>name of attribute</em></span><span class=\"code\">>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>help</td>\r\n<td>Get Python docstring on object.</td>\r\n<td><span class=\"code\">help(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>)</span><span class=\"code\"><br /></span><span class=\"code\">help(getattr)</span></td>\r\n</tr>\r\n<tr>\r\n<td>id</td>\r\n<td>Show the location in the computer's RAM where an object is stored.</td>\r\n<td><span class=\"code\">id(<</span><span class=\"code\"><em>name of object</em></span><span class=\"code\">>)</span><span class=\"code\"><br /></span><span class=\"code\">id(help)</span></td>\r\n</tr>\r\n<tr>\r\n<td>int</td>\r\n<td>Convert a string into an integer number.</td>\r\n<td><span class=\"code\">int(</span><span class=\"code\">'</span><span class=\"code\">0</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>len</td>\r\n<td>Get the number of elements in a sequence.</td>\r\n<td><span class=\"code\">len([0,1])</span></td>\r\n</tr>\r\n<tr>\r\n<td>object</td>\r\n<td>A base on which other classes can inherit from.</td>\r\n<td><span class=\"code\">class CustomObject(object):</span></td>\r\n</tr>\r\n<tr>\r\n<td>open</td>\r\n<td>Open a file on disk, return a file object.</td>\r\n<td><span class=\"code\">open(<path to file>, <mode>)</span><br /><span class=\"code\">open('mydatafile.txt', 'r') # read</span><br />(opens a file to read data from)<br /><span class=\"code\">open('mydatafile.txt', 'w') # write</span><br />(creates a new file to write to, destroys any existing file with the same name)<br /><span class=\"code\">open('mydatafile.txt', 'a') # append</span><br />(adds to an existing file if any, or creates<br />a new one if none existing already)</td>\r\n</tr>\r\n<tr>\r\n<td>print</td>\r\n<td>Reimplementation of <span class=\"code\">print</span> keyword, but as a function.<br />Need to import from the future to use it (srsly!)<br /></td>\r\n<td><span class=\"code\">from future import print_function</span><br /><span class=\"code\">print ('Hello World!</span><span class=\"code\">'</span><span class=\"code\">)</span></td>\r\n</tr>\r\n<tr>\r\n<td>range</td>\r\n<td>Gives numbers between the lower and upper limits specified (including the lower, but excluding the upper limit). A step may be specified.</td>\r\n<td><span class=\"code\">range(10)</span><span class=\"code\"><br /></span><span class=\"code\">range(5,10)</span><span class=\"code\"><br /></span><span class=\"code\">range(1,10,2)</span></td>\r\n</tr>\r\n<tr>\r\n<td>raw_input</td>\r\n<td>Get some text as a string from the user, with an optional prompt.</td>\r\n<td><span class=\"code\">prompt =</span> <span class=\"code\">'</span><span class=\"code\">What is your guess?</span> <span class=\"code\">'</span><span class=\"code\"><br />players_guess = raw_input(prompt)</span></td>\r\n</tr>\r\n<tr>\r\n<td>str</td>\r\n<td>Convert an object (usually a number) into a string (usually for printing).</td>\r\n<td><span class=\"code\">str(0)</span></td>\r\n</tr>\r\n<tr>\r\n<td>type</td>\r\n<td>Give the type of the specified object.</td>\r\n<td><span class=\"code\">type(0)<br />type(</span><span class=\"code\">'</span><span class=\"code\">0</span><span class=\"code\">'</span><span class=\"code\">)<br />type([])<br />type({})<br />type(())</span></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Use the work that others have already done. Try these modules from the Python standard library.</p>\r\n<table border=\"0\">\r\n<caption>Selected Functions from the Standard Library </caption>\r\n<tbody>\r\n<tr>\r\n<th>Module</th><th>What It Does</th><th>Sample Functions/Objects</th>\r\n</tr>\r\n<tr>\r\n<td>os.path</td>\r\n<td>Functions relating to files and file paths.</td>\r\n<td><span class=\"code\">os.path.exists(<path to file>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>pickle, cPickle</td>\r\n<td>Save and load objects to/from a file.</td>\r\n<td><span class=\"code\">pickle.load(<file object to load from>),</span> <span class=\"code\">pickle.dump(<object to dump>, <file object to save to>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>random</td>\r\n<td>Various functions relating to random numbers.</td>\r\n<td><span class=\"code\">random.choice(<sequence to choose from>), random.randint(<lower limit>, <upper limit>), random.shuffle(<name of list to shuffle>)</span></td>\r\n</tr>\r\n<tr>\r\n<td>String</td>\r\n<td>Stuff relating to strings.</td>\r\n<td><span class=\"code\">string.printable</span></td>\r\n</tr>\r\n<tr>\r\n<td>sys</td>\r\n<td>Various functions related to your computer system.</td>\r\n<td><span class=\"code\">sys.exit()</span></td>\r\n</tr>\r\n<tr>\r\n<td>Time</td>\r\n<td>Time-related functions.</td>\r\n<td><span class=\"code\">time.time()</span></td>\r\n</tr>\r\n<tr>\r\n<td>Tkinter</td>\r\n<td>User interface widgets and associated constants.</td>\r\n<td><span class=\"code\">Tkinter.ALL</span><br /><span class=\"code\">Tkinter.BOTH</span><br /><span class=\"code\">Tkinter.CENTER</span><br /><span class=\"code\">Tkinter.END</span><br /><span class=\"code\">Tkinter.HORIZONTAL</span><br /><span class=\"code\">Tkinter.LEFT</span><br /><span class=\"code\">Tkinter.NW</span><br /><span class=\"code\">Tkinter.RIGHT</span><br /><span class=\"code\">Tkinter.TOP</span><br /><span class=\"code\">Tkinter.Y</span><br /><span class=\"code\">Tkinter.Button(<parent widget>,</span><br /><span class=\"code\">text=<button text>)</span><br /><span class=\"code\">Tkinter.Canvas(<parent widget>,</span><br /><span class=\"code\"> width=<width>, height=<height>)</span><br /><span class=\"code\">Tkinter.Checkbutton(<parent widget>,</span><br /><span class=\"code\"> text=<checkbutton text>)</span><br /><span class=\"code\">Tkinter.Entry(<parent widget>,</span><br /><span class=\"code\"> width=<number of characters wide>),</span><br /><span class=\"code\">Tkinter.Frame(<parent widget>)</span><br /><span class=\"code\">Tkinter.IntVar()</span><br /><span class=\"code\">Tkinter.Label(<parent widget>,</span><br /><span class=\"code\"> text = <label text>)</span><br /><span class=\"code\">Tkinter.mainloop()</span><br /><span class=\"code\">Tkinter.Menu(<parent widget>)</span><br /><span class=\"code\">Tkinter.OptionMenu(<parent widget>,</span><br /><span class=\"code\"> None, None)</span><br /><span class=\"code\">Tkinter.Scale(<parent widget>,</span><br /><span class=\"code\"> from_=<lower limit>,</span><br /><span class=\"code\"> to=<upper limit>)</span><br /><span class=\"code\">Tkinter.Scrollbar(<parent widget>)</span><br /><span class=\"code\">Tkinter.StringVar()</span><br /><span class=\"code\">Tkinter.Tk()</span><br /></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p>Add, subtract, divide, multiply, and more using these operators.</p>\r\n<table border=\"0\">\r\n<caption>Python Operators </caption>\r\n<tbody>\r\n<tr>\r\n<th>Operator</th><th>Name</th><th>Effect</th><th>Examples</th>\r\n</tr>\r\n<tr>\r\n<td>+</td>\r\n<td>Plus</td>\r\n<td>Add two numbers.<br />Join two strings together.</td>\r\n<td>Add: <span class=\"code\">>>> 1+1</span><span class=\"code\"><br /></span><span class=\"code\">2</span><span class=\"code\"><br /></span>Join: <span class=\"code\">>>></span> <span class=\"code\">'</span><span class=\"code\">a</span><span class=\"code\">'</span><span class=\"code\">+</span><span class=\"code\">'</span><span class=\"code\">b</span><span class=\"code\">'</span><span class=\"code\"><br /></span><span class=\"code\">'</span><span class=\"code\">ab</span><span class=\"code\">'</span></td>\r\n</tr>\r\n<tr>\r\n<td>–</td>\r\n<td>Minus</td>\r\n<td>Subtract a number from another.<br />Can't use for strings.</td>\r\n<td><span class=\"code\">>>> 1-1</span><span class=\"code\"><br /></span><span class=\"code\">0</span></td>\r\n</tr>\r\n<tr>\r\n<td>*</td>\r\n<td>Times</td>\r\n<td>Multiply two numbers.<br />Make copies of a string.</td>\r\n<td>Multiply: <span class=\"code\">>>> 2*2</span><span class=\"code\"><br /></span><span class=\"code\">4</span><span class=\"code\"><br /></span>Copy: <span class=\"code\">>>></span> <span class=\"code\">'</span><span class=\"code\">a</span><span class=\"code\">'</span><span class=\"code\">*2</span><span class=\"code\"><br /></span><span class=\"code\">'</span><span class=\"code\">aa</span><span class=\"code\">'</span></td>\r\n</tr>\r\n<tr>\r\n<td>/</td>\r\n<td>Divide</td>\r\n<td>Divide one number by another.<br />Can't use for strings.</td>\r\n<td>1/2 # integer division:<br />Answer will be rounded down.<br />1/2.0 # decimal division<br />1/float(2) # decimal division<br /></td>\r\n</tr>\r\n<tr>\r\n<td>%</td>\r\n<td>Remainder (Modulo)</td>\r\n<td>Give the remainder when dividing the left number by the right number.<br />Formatting operator for strings.</td>\r\n<td><span class=\"code\">>>> 10%3</span><br /><span class=\"code\">1</span></td>\r\n</tr>\r\n<tr>\r\n<td>**</td>\r\n<td>Power</td>\r\n<td><span class=\"code\">x**y</span> means raise <span class=\"code\">x</span> to the power of <span class=\"code\">y</span>.<br />Can't use for strings.</td>\r\n<td><span class=\"code\">>>> 3**2</span><span class=\"code\"><br /></span><span class=\"code\">9</span></td>\r\n</tr>\r\n<tr>\r\n<td>=</td>\r\n<td>Assignment</td>\r\n<td>Assign the value on the right to the variable on the left.</td>\r\n<td><span class=\"code\">>>> a = 1</span></td>\r\n</tr>\r\n<tr>\r\n<td>==</td>\r\n<td>Equality</td>\r\n<td>Is the left side equal to the right side? Is <span class=\"code\">True</span> if so; is <span class=\"code\">False</span> otherwise.</td>\r\n<td><span class=\"code\">>>> 1 == 1</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> 'a' == 'a'</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>!=</td>\r\n<td>Not equal</td>\r\n<td>Is the left side <em>not</em> equal to the right side? Is <span class=\"code\">True</span> if so; is False otherwise.</td>\r\n<td><span class=\"code\">>>> 1 != 1</span><br /><span class=\"code\">False</span><br /><span class=\"code\">>>> 1 != 2</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> 'a' != 'a'</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>></td>\r\n<td>Greater than</td>\r\n<td>Is the left side greater than the right side?<br /><span class=\"code\">>=</span> means greater than or equal to</td>\r\n<td><span class=\"code\">>>> 2 > 1</span><span class=\"code\"><br /></span><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td><</td>\r\n<td>Less than</td>\r\n<td>Is the left side less than the right side?<br /><span class=\"code\"><=</span> means less than or equal to</td>\r\n<td><span class=\"code\">>>> 1 < 2</span><span class=\"code\"><br /></span><span class=\"code\">True</span></td>\r\n</tr>\r\n<tr>\r\n<td>& (or and)</td>\r\n<td>And</td>\r\n<td>Are both left and right <span class=\"code\">True</span>?<br />Typically used for complex conditions where you want to do something if everything is <span class=\"code\">True</span>:<br /><span class=\"code\">while im_hungry and you_have_food:</span></td>\r\n<td><span class=\"code\">>>> True & True</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> True and False</span><br /><span class=\"code\">False </span><br /><span class=\"code\">>>> True & (1 == 2)</span><br /><span class=\"code\">False</span></td>\r\n</tr>\r\n<tr>\r\n<td>| (or or)</td>\r\n<td>Or</td>\r\n<td>Is either left or right <span class=\"code\">True</span>?<br />Typically used for complex conditions where you want at least one thing to be <span class=\"code\">True</span>:<br /><span class=\"code\">while im_bored or youre_bored:</span></td>\r\n<td><span class=\"code\">>>> True | False</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> True or False</span><br /><span class=\"code\">True</span><br /><span class=\"code\">>>> False | False</span><br /><span class=\"code\">False</span><br /><span class=\"code\">>>> (1 == 1) | False</span><br /><span class=\"code\">True</span></td>\r\n</tr>\r\n</tbody>\r\n</table>","blurb":"","authors":[{"authorId":9026,"name":"Brendan Scott","slug":"brendan-scott","description":" <p>Brendan Scott is a dad who loves Python and wants kids to get some of its magic too. He started pythonforkids.brendanscott.com to help teach his oldest child to code. He maintains it to help other young people learn Python.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9026"}}],"primaryCategoryTaxonomy":{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[{"label":"Python Core Words","target":"#tab1"}],"relatedArticles":{"fromBook":[{"articleId":207407,"title":"Python For Kids For Dummies Cheat Sheet","slug":"python-for-kids-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/207407"}},{"articleId":141581,"title":"Use Python to Help with Your Math Homework","slug":"use-python-to-help-with-your-math-homework","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/141581"}},{"articleId":141443,"title":"Using Tkinter Widgets in Python","slug":"using-tkinter-widgets-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/141443"}},{"articleId":139551,"title":"How to Interrupt a Program in Python","slug":"how-to-interrupt-a-program-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/139551"}},{"articleId":139550,"title":"How to Name Functions in Python","slug":"how-to-name-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/139550"}}],"fromCategory":[{"articleId":264919,"title":"How to Define and Use Python Lists","slug":"how-to-define-and-use-python-lists","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264919"}},{"articleId":264911,"title":"How to Use Lambda Functions in Python","slug":"how-to-use-lambda-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264911"}},{"articleId":264906,"title":"Your Guide to the Python Standard Library","slug":"your-guide-to-the-python-standard-library","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264906"}},{"articleId":264894,"title":"A Beginner’s Guide to Python Versions","slug":"a-beginners-guide-to-python-versions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264894"}},{"articleId":264888,"title":"How to Build a Simple Neural Network in Python","slug":"how-to-build-a-simple-neural-network-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264888"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281835,"slug":"python-for-kids-for-dummies","isbn":"9781119093107","categoryList":["technology","programming-web-design","python"],"amazon":{"default":"https://www.amazon.com/gp/product/1119093104/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1119093104/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1119093104-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1119093104/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1119093104/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/python-for-kids-for-dummies-cover-9781119093107-203x255.jpg","width":203,"height":255},"title":"Python For Kids For Dummies","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"<p>Brendan Scott is a dad who loves Python and wants kids to get some of its magic too. He started pythonforkids.brendanscott.com to help teach his oldest child to code. He maintains it to help other young people learn Python.</p>","authors":[{"authorId":9026,"name":"Brendan Scott","slug":"brendan-scott","description":" <p>Brendan Scott is a dad who loves Python and wants kids to get some of its magic too. He started pythonforkids.brendanscott.com to help teach his oldest child to code. He maintains it to help other young people learn Python.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9026"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119093107&quot;]},{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;For Kids&quot;]}]\" id=\"du-slot-651d7e2ed9089\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781119093107&quot;]},{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;For Kids&quot;]}]\" id=\"du-slot-651d7e2eda216\"></div></div>"},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2023-10-04T00:00:00+00:00","dummiesForKids":"yes","sponsoredContent":"no","adInfo":"","adPairKey":[{"adPairKey":"cat","adPairValue":"For Kids"}]},"status":"publish","visibility":"public","articleId":141474},{"headers":{"creationTime":"2016-03-27T16:47:06+00:00","modifiedTime":"2023-10-03T17:18:35+00:00","timestamp":"2023-10-03T18:01:03+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"Python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"},"slug":"python","categoryId":33606}],"title":"Python for Data Science For Dummies Cheat Sheet","strippedTitle":"python for data science for dummies cheat sheet","slug":"python-for-data-science-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"Perform data science tasks with minimum effort by using Python. Learn line plot styles, common programming errors, and more.","noIndex":0,"noFollow":0},"content":"Python is an incredible programming language that you can use to perform data science tasks with a minimum of effort. The huge number of available libraries means that the low-level code you normally need to write is likely already available from some other source.\r\n\r\nAll you need to focus on is getting the job done. With that in mind, this Cheat Sheet helps you access the most commonly needed reminders for making your programming experience fast and easy.","description":"Python is an incredible programming language that you can use to perform data science tasks with a minimum of effort. The huge number of available libraries means that the low-level code you normally need to write is likely already available from some other source.\r\n\r\nAll you need to focus on is getting the job done. With that in mind, this Cheat Sheet helps you access the most commonly needed reminders for making your programming experience fast and easy.","blurb":"","authors":[{"authorId":9109,"name":"John Paul Mueller","slug":"john-paul-mueller","description":"<b> John Mueller</b> has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9109"}},{"authorId":9110,"name":"Luca Massaron","slug":"luca-massaron","description":"<b>Luca Massaron</b> is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9110"}}],"primaryCategoryTaxonomy":{"categoryId":33606,"title":"Python","slug":"python","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33606"}},"secondaryCategoryTaxonomy":{"categoryId":33580,"title":"General Data Science","slug":"general-data-science","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33580"}},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":262687,"title":"Working with Google Colaboratory Notebooks","slug":"working-with-google-colaboratory-notebooks","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262687"}},{"articleId":262680,"title":"Python Programming: Making Machine Learning Accessible with the Random Forest Algorithm","slug":"python-programming-making-machine-learning-accessible-with-the-random-forest-algorithm","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262680"}},{"articleId":262675,"title":"What is Google Colaboratory?","slug":"what-is-google-colaboratory","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262675"}},{"articleId":262651,"title":"Playing with Scikit-Learn and Neural Networks","slug":"playing-with-scikit-learn-and-neural-networks","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262651"}},{"articleId":262643,"title":"Tips for Using Jupyter Notebook for Python Programming","slug":"tips-for-using-jupyter-notebook-for-python-programming","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/262643"}}],"fromCategory":[{"articleId":264919,"title":"How to Define and Use Python Lists","slug":"how-to-define-and-use-python-lists","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264919"}},{"articleId":264911,"title":"How to Use Lambda Functions in Python","slug":"how-to-use-lambda-functions-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264911"}},{"articleId":264906,"title":"Your Guide to the Python Standard Library","slug":"your-guide-to-the-python-standard-library","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264906"}},{"articleId":264894,"title":"A Beginner’s Guide to Python Versions","slug":"a-beginners-guide-to-python-versions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264894"}},{"articleId":264888,"title":"How to Build a Simple Neural Network in Python","slug":"how-to-build-a-simple-neural-network-in-python","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/264888"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281834,"slug":"python-for-data-science-for-dummies-2nd-edition","isbn":"9781394213146","categoryList":["technology","programming-web-design","python"],"amazon":{"default":"https://www.amazon.com/gp/product/139421314X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/139421314X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/139421314X-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/139421314X/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/139421314X/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/python-for-data-science-for-dummies-3rd-edition-cover-9781394213146-203x255.jpg","width":203,"height":255},"title":"Python for Data Science For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><b> John Mueller</b> has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books. <b><b data-author-id=\"9110\">Luca Massaron</b></b> is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000.</p>","authors":[{"authorId":9109,"name":"John Paul Mueller","slug":"john-paul-mueller","description":"<b> John Mueller</b> has published more than 100 books on technology, data, and programming. John has a website and blog where he writes articles on technology and offers assistance alongside his published books.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9109"}},{"authorId":9110,"name":"Luca Massaron","slug":"luca-massaron","description":"<b>Luca Massaron</b> is a data scientist specializing in insurance and finance. A Google Developer Expert in machine learning, he has been involved in quantitative analysis and algorithms since 2000.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9110"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394213146&quot;]}]\" id=\"du-slot-651c56df11374\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;python&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394213146&quot;]}]\" id=\"du-slot-651c56df11cbd\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":142841,"title":"The 8 Most Common Python Programming Errors","slug":"the-8-most-common-python-programming-errors","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/142841"}},{"articleId":142839,"title":"Line Plot Styles","slug":"line-plot-styles","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/142839"}},{"articleId":142840,"title":"Common IPython Magic Functions","slug":"common-ipython-magic-functions","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/142840"}},{"articleId":142686,"title":"Scikit-Learn Method Summary","slug":"scikit-learn-method-summary","categoryList":["technology","programming-web-design","python"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/142686"}}],"content":[{"title":"The 8 most common Python programming errors","thumb":null,"image":null,"content":"<p>Every developer on the planet makes mistakes. However, knowing about common mistakes will save you time and effort later. The following list tells you about the most common errors that developers experience when working with Python:</p>\n<ul class=\"level-one\">\n<li>\n<p class=\"first-para\"><strong>Using the incorrect indentation:</strong> Many Python features rely on indentation. For example, when you create a new class, everything in that class is indented under the class declaration. The same is true for decision, loop, and other structural statements. If you find that your code is executing a task when it really shouldn’t be, start reviewing the indentation you’re using.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Relying on the assignment operator instead of the equality operator:</strong> When performing a comparison between two objects or value, you just use the equality operator (==), not the assignment operator (=). The assignment operator places an object or value within a variable and doesn’t compare anything.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Placing function calls in the wrong order when creating complex statements:</strong> Python always executes functions from left to right. So the statement <code>MyString.strip().center(21, \"*\")</code> produces a different result than <code>MyString.center(21, \"*\").strip()</code>. When you encounter a situation in which the output of a series of concatenated functions is different from what you expected, you need to check function order to ensure that each function is in the correct place.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Misplacing punctuation:</strong> You can put punctuation in the wrong place and create an entirely different result. Remember that you must include a colon at the end of each structural statement. In addition, the placement of parentheses is critical. For example, <code>(1 + 2) * (3 + 4), 1 + ((2 * 3) + 4)</code>, and <code>1 + (2 * (3 + 4))</code> all produce different results.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Using the incorrect logical operator:</strong> Most of the operators don’t present developers with problems, but the logical operators do. Remember to use <code>and </code>to determine when both operands must be <code>True </code>and <code>or </code>when either of the operands can be <code>True</code>.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Creating count-by-one errors on loops:</strong> Remember that a loop doesn’t count the last number you specify in a range. So, if you specify the range <code>[1:11]</code>, you actually get output for values between 1 and 10.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Using the wrong capitalization:</strong> Python is case sensitive, so MyVar is different from myvar and MYVAR. Always check capitalization when you find that you can’t access a value you expected to access.</p>\n</li>\n<li>\n<p class=\"first-para\"><strong>Making a spelling mistake:</strong> Even seasoned developers suffer from spelling errors at times. Ensuring that you use a common approach to naming variables, classes, and functions does help. However, even a consistent naming scheme won’t always prevent you from typing MyVer when you meant to type MyVar.</p>\n</li>\n<li><strong>Misunderstanding how function defaults work:</strong> A function’s default value is set at the time it’s first evaluated, rather than each time you call it. Consequently, a function declaration like this:def myFunc(list=[]):list.append(&#8220;value&#8221;)\n<p>return list</p>\n<p>will only provide an empty list the first time you call it, rather than every time you call it without providing a value for list. Subsequent calls will simply add &#8220;value&#8221; to an ever growing list. So if you call myFunc() three times, <span style=\"text-decoration: line-through;\">list</span> will actually equal [&#8220;value&#8221;, &#8220;value&#8221;, &#8220;value&#8221;]. The workaround for this issue is to check the input value every time in the code and act accordingly, such as:</p>\n<p>def myFunc(list=None):</p>\n<p>if list is None:</p>\n<p>list = []</p>\n<p>list.append(&#8220;value&#8221;)</p>\n<p>return list</li>\n<li><strong>Modifying a list while iterating over it:</strong> If a developer is lucky, this particular mistake results in an index out-of-range error. At least there is some indication of where to look. However, when working with some data science problems that don’t use the entire list, but simply iterate over parts of it, the mistake can introduce all sorts of data skewing and analysis problems that can be extremely difficult to locate (assuming that you know there is a problem at all). Using list comprehensions is a common method of avoiding this problem.</li>\n<li><strong>Creating a module name that clashes with a Python standard library module:</strong> If you create a module that has the same name as an existing Python module, Python may import your module instead of the one you wanted, leading to some difficult-to-find errors. The best way to avoid this issue is to ensure that you use module names that are guaranteed to be unique, such as prepending your organization name to the module name.</li>\n</ul>\n"},{"title":"Line plot styles","thumb":null,"image":null,"content":"<p>Whenever you create a plot, you need to identify the sources of information using more than just the lines. Creating a plot that uses differing line types and data point symbols makes the plot much easier for other people to use. The following table lists the line plot styles.</p>\n<table>\n<tbody>\n<tr>\n<td colspan=\"2\"><strong>Color</strong></td>\n<td colspan=\"2\"><strong>Marker</strong></td>\n<td colspan=\"2\"><strong>Style</strong></td>\n</tr>\n<tr>\n<td><strong>Code</strong></td>\n<td><strong>Line Color</strong></td>\n<td><strong>Code</strong></td>\n<td><strong>Marker Style</strong></td>\n<td><strong>Code</strong></td>\n<td><strong>Line Style</strong></td>\n</tr>\n<tr>\n<td>b</td>\n<td>blue</td>\n<td>.</td>\n<td>point</td>\n<td>&#8211;</td>\n<td>Solid</td>\n</tr>\n<tr>\n<td>g</td>\n<td>green</td>\n<td>o</td>\n<td>circle</td>\n<td>:</td>\n<td>Dotted</td>\n</tr>\n<tr>\n<td>r</td>\n<td>red</td>\n<td>x</td>\n<td>x-mark</td>\n<td>-.</td>\n<td>dash dot</td>\n</tr>\n<tr>\n<td>c</td>\n<td>cyan</td>\n<td>+</td>\n<td>plus</td>\n<td>&#8212;</td>\n<td>Dashed</td>\n</tr>\n<tr>\n<td>m</td>\n<td>magenta</td>\n<td>*</td>\n<td>star</td>\n<td>(none)</td>\n<td>no line</td>\n</tr>\n<tr>\n<td>y</td>\n<td>yellow</td>\n<td>s</td>\n<td>square</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>k</td>\n<td>black</td>\n<td>d</td>\n<td>diamond</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>w</td>\n<td>white</td>\n<td>v</td>\n<td>down triangle</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>^</td>\n<td>up triangle</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>&lt;</td>\n<td>left triangle</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>&gt;</td>\n<td>right triangle</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>p</td>\n<td>5-point star</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td>h</td>\n<td>6-point star</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p class=\"Tip\">Remember that you can also use these styles with other kinds of plots. For example, a scatter plot can use these styles to define each of the data points. When in doubt, try the styles to see whether they’ll work with your particular plot.</p>\n"},{"title":"Common IPython Magic Functions","thumb":null,"image":null,"content":"<p>It’s kind of amazing to think that IPython provides you with magic, but that’s precisely what you get with the magic functions. Most magic functions begin with either a % or %% sign. Those with a % sign work within the environment, and those with a %% sign work at the cell level.</p>\n<p>There are a few specialized functions, such as the system command escape (!), that require a special symbol or technique. Of these, the system command escape is the most essential to know. Another useful alternative is variable expansion ($), which is used like $(myVar), to provide a value without retyping it.</p>\n<p>Note that the magic functions work best with Jupyter Notebook. People using alternatives, such as Google Colab, may find that some magic functions fail to provide the desired result.</p>\n<p>The following list gives you a few of the most common magic functions and their purposes. To obtain a full list, type <strong>%quickref</strong> and press Enter in Jupyter Notebook or Google Colab, or <a href=\"https://damontallen.github.io/IPython-quick-ref-sheets/\" target=\"_blank\" rel=\"noopener\">check out the full list</a>.</p>\n<table>\n<tbody>\n<tr>\n<td width=\"97\"><strong>Magic Function</strong></td>\n<td width=\"84\"><strong>Type Alone Provides Status?</strong></td>\n<td width=\"351\"><strong>Description</strong></td>\n</tr>\n<tr>\n<td width=\"97\">%%timeit or %%prun</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Calculates the best time performance for all the instructions in a cell, apart from the one placed on the same cell line as the cell magic (which could therefore be an initialization instruction). The %%prun variant provides more detailed information because it relies on the Python profiler output.</td>\n</tr>\n<tr>\n<td width=\"97\">%%writefile</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Writes the contents of a cell to the specified file.</td>\n</tr>\n<tr>\n<td width=\"97\">%alias</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Assigns or displays an alias for a system command.</td>\n</tr>\n<tr>\n<td width=\"97\">%autocall</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Enables you to call functions without including the parentheses. The settings are Off, Smart (default), and Full. The Smart setting applies the parentheses only if you include an argument with the call.</td>\n</tr>\n<tr>\n<td width=\"97\">%automagic</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Enables you to call the line magic functions without including the % sign. The settings are False (default) and True.</td>\n</tr>\n<tr>\n<td width=\"97\">%bookmark</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Sets, lists, or clears bookmarks used to track the current location within a drive’s directory system. <a href=\"https://ipythonbook.com/magic/bookmark.html\" target=\"_blank\" rel=\"noopener\">This article</a> provides additional information on using this magic.</td>\n</tr>\n<tr>\n<td width=\"97\">%cd</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Changes directory to a new storage location. You can also use this command to move through the directory history or to change directories to a bookmark.</td>\n</tr>\n<tr>\n<td width=\"97\">%cls or %clear</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Clears the screen.</td>\n</tr>\n<tr>\n<td width=\"97\">%colors</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Specifies the colors used to display text associated with prompts, the information system, and exception handlers. You can choose between NoColor (black and white), Linux (default), and LightBG.</td>\n</tr>\n<tr>\n<td width=\"97\">%config</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Enables you to configure IPython.</td>\n</tr>\n<tr>\n<td width=\"97\">%debug or %%debug</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Starts the Python interactive debugger so that it’s possible to debug an application within the Notebook environment.</td>\n</tr>\n<tr>\n<td width=\"97\">%dhist</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Displays a list of directories visited during the current session.</td>\n</tr>\n<tr>\n<td width=\"97\">%env</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Gets, sets, or lists environment variables.</td>\n</tr>\n<tr>\n<td width=\"97\">%file</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Outputs the name of the file that contains the source code for the object.</td>\n</tr>\n<tr>\n<td width=\"97\">%hist</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Displays a list of magic function commands issued during the current session.</td>\n</tr>\n<tr>\n<td width=\"97\">%install_ext</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Installs the specified extension.</td>\n</tr>\n<tr>\n<td width=\"97\">%load</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Loads application code from another source, such as an online example.</td>\n</tr>\n<tr>\n<td width=\"97\">%load_ext</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Loads a Python extension using its module name.</td>\n</tr>\n<tr>\n<td width=\"97\">%lsmagic</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Displays a list of the currently available magic functions.</td>\n</tr>\n<tr>\n<td width=\"97\">%matplotlib</td>\n<td width=\"84\">Yes</td>\n<td width=\"351\">Sets the backend processor used for plots. Using the inline value displays the plot within the cell for an IPython Notebook file. The possible values are ‘gtk’, ‘gtk3’, ‘inline’, ‘nbagg’, ‘osx’, ‘qt’, ‘qt4’, ‘qt5’, ‘tk’, and ‘wx’.</td>\n</tr>\n<tr>\n<td width=\"97\">%more</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Displays a file through the pager so that it’s possible to scan a data file while working in it in code.</td>\n</tr>\n<tr>\n<td width=\"97\">%paste</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Pastes the content of the clipboard into the IPython environment.</td>\n</tr>\n<tr>\n<td width=\"97\">%pdef</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Shows how to call the object (assuming that the object is callable).</td>\n</tr>\n<tr>\n<td width=\"97\">%pdoc</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Displays the docstring for an object.</td>\n</tr>\n<tr>\n<td width=\"97\">%pinfo</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Displays detailed information about the object (often more than provided by help alone).</td>\n</tr>\n<tr>\n<td width=\"97\">%pinfo2</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Displays extra detailed information about the object (when available).</td>\n</tr>\n<tr>\n<td width=\"97\">%psource</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Displays the source code for the object (assuming that the source is available).</td>\n</tr>\n<tr>\n<td width=\"97\">%reload_ext</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Reloads a previously installed extension.</td>\n</tr>\n<tr>\n<td width=\"97\">%timeit or %prun</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Calculates the best performance time for an instruction. The %prun variant provides more detailed information because it relies on the Python profiler output.</td>\n</tr>\n<tr>\n<td width=\"97\">%unalias</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Removes a previously created alias from the list.</td>\n</tr>\n<tr>\n<td width=\"97\">%unload_ext</td>\n<td width=\"84\">No</td>\n<td width=\"351\">Unloads the specified extension.</td>\n</tr>\n</tbody>\n</table>\n<p>&nbsp;</p>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2023-10-02T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":207489},{"headers":{"creationTime":"2016-03-26T21:26:50+00:00","modifiedTime":"2023-09-29T14:42:59+00:00","timestamp":"2023-09-29T15:01:03+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"HTML","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33600"},"slug":"html","categoryId":33600}],"title":"How to Add Sound to Your Web Site Using HTML","strippedTitle":"how to add sound to your web site using html","slug":"how-to-add-sound-to-your-web-site-using-html","canonicalUrl":"","seo":{"metaDescription":"There are plusses and minuses of adding sound to your Web page, but if you decide adding sound is of value to your Web page visitors, HTML offers two competing ","noIndex":0,"noFollow":0},"content":"There are plusses and minuses of adding sound to your Web page, but if you decide adding sound is of value to your Web page visitors, HTML offers two competing ways to add it: with the <code>&lt;bgsound&gt;</code> tag and with the <code>embed</code> tag.\r\n\r\nThe <code>&lt;bgsound&gt;</code> tag works well and has useful options for controlling sound, but it’s not supported by all browsers.\r\n\r\nThis example uses the <code>&lt;embed&gt;</code> tag, which is not officially supported by the HTML standard at all, but it works in most browsers. <code>&lt;embed&gt;</code> has options for different media players, such as Windows Media Player or Apple QuickTime.\r\n\r\nFollow these steps to add sound to a Web page in a text editor:\r\n<ol class=\"level-one\">\r\n \t<li>\r\n<p class=\"first-para\">Open your Web page in Notepad.</p>\r\n<p class=\"child-para\">Let your Web page’s user know they can stop sound from playing in your Web page by clicking the Stop button in their browsers.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Enter the <code>&lt;embed&gt;</code> tag and a link to the sound file you want to use.</p>\r\n<p class=\"child-para\">An example looks like this: <code> &lt;embed src=</code><code>&lt;i&gt;“pathname/filename”&lt;/i&gt;</code><code>&gt;</code>, <code>&lt;i&gt;“pathname/filename”&lt;/i&gt;</code> is a link to the sound file.</p>\r\n<p class=\"child-para\">The simplest way to be sure you have the link right is to place the sound file in the same folder as the Web page; that way the link is simply the filename.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Click File→Save and reopen the file.</p>\r\n<p class=\"child-para\">The sound should play. Test the link right away to be sure it will work.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">If the sound doesn’t play, experiment to make sure you have the path right and that sound plays on your machine.</p>\r\n<p class=\"child-para\">To make sure you have the link right, put the file in the same folder as your Web page and simplify the link. To make sure that sound playback works on your machine, navigate to the file in Windows Explorer and click it. It should play. If not, identify and fix the files affecting sound playback on your machine.</p>\r\n</li>\r\n</ol>","description":"There are plusses and minuses of adding sound to your Web page, but if you decide adding sound is of value to your Web page visitors, HTML offers two competing ways to add it: with the <code>&lt;bgsound&gt;</code> tag and with the <code>embed</code> tag.\r\n\r\nThe <code>&lt;bgsound&gt;</code> tag works well and has useful options for controlling sound, but it’s not supported by all browsers.\r\n\r\nThis example uses the <code>&lt;embed&gt;</code> tag, which is not officially supported by the HTML standard at all, but it works in most browsers. <code>&lt;embed&gt;</code> has options for different media players, such as Windows Media Player or Apple QuickTime.\r\n\r\nFollow these steps to add sound to a Web page in a text editor:\r\n<ol class=\"level-one\">\r\n \t<li>\r\n<p class=\"first-para\">Open your Web page in Notepad.</p>\r\n<p class=\"child-para\">Let your Web page’s user know they can stop sound from playing in your Web page by clicking the Stop button in their browsers.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Enter the <code>&lt;embed&gt;</code> tag and a link to the sound file you want to use.</p>\r\n<p class=\"child-para\">An example looks like this: <code> &lt;embed src=</code><code>&lt;i&gt;“pathname/filename”&lt;/i&gt;</code><code>&gt;</code>, <code>&lt;i&gt;“pathname/filename”&lt;/i&gt;</code> is a link to the sound file.</p>\r\n<p class=\"child-para\">The simplest way to be sure you have the link right is to place the sound file in the same folder as the Web page; that way the link is simply the filename.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">Click File→Save and reopen the file.</p>\r\n<p class=\"child-para\">The sound should play. Test the link right away to be sure it will work.</p>\r\n</li>\r\n \t<li>\r\n<p class=\"first-para\">If the sound doesn’t play, experiment to make sure you have the path right and that sound plays on your machine.</p>\r\n<p class=\"child-para\">To make sure you have the link right, put the file in the same folder as your Web page and simplify the link. To make sure that sound playback works on your machine, navigate to the file in Windows Explorer and click it. It should play. If not, identify and fix the files affecting sound playback on your machine.</p>\r\n</li>\r\n</ol>","blurb":"","authors":[{"authorId":9283,"name":"Bud E. Smith","slug":"bud-e-smith","description":" Mark Middlebrook, an AutoCAD expert, is president of Daedalus Consulting and a contributing editor at CADALYST magazine. Bud Smith is a veteran For Dummies author.","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/9283"}}],"primaryCategoryTaxonomy":{"categoryId":33600,"title":"HTML","slug":"html","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33600"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[],"fromCategory":[{"articleId":206142,"title":"How to Use the CoffeeCup HTML Editor","slug":"how-to-use-the-coffeecup-html-editor","categoryList":["technology","programming-web-design","html"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/206142"}},{"articleId":206138,"title":"How to Create HTML Lists in Notepad","slug":"how-to-create-html-lists-in-notepad","categoryList":["technology","programming-web-design","html"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/206138"}},{"articleId":193063,"title":"How to Use HTML Lists on Your Web Page","slug":"how-to-use-html-lists-on-your-web-page","categoryList":["technology","programming-web-design","html"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/193063"}},{"articleId":193018,"title":"How to Create a Text Navigation Bar in HTML","slug":"how-to-create-a-text-navigation-bar-in-html","categoryList":["technology","programming-web-design","html"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/193018"}},{"articleId":189340,"title":"A Sample Web Page in HTML","slug":"a-sample-web-page-in-html","categoryList":["technology","programming-web-design","html"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/189340"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":0,"slug":null,"isbn":null,"categoryList":null,"amazon":null,"image":null,"title":null,"testBankPinActivationLink":null,"bookOutOfPrint":false,"authorsInfo":null,"authors":null,"_links":null},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;html&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[null]}]\" id=\"du-slot-6516e6af0b5f6\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;html&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[null]}]\" id=\"du-slot-6516e6af0bee9\"></div></div>"},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"One year","lifeExpectancySetFrom":"2023-09-29T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":193022},{"headers":{"creationTime":"2023-07-05T17:09:19+00:00","modifiedTime":"2023-09-25T18:56:27+00:00","timestamp":"2023-09-25T21:01:03+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet","strippedTitle":"html, css, & javascript all-in-one for dummies cheat sheet","slug":"html-css-javascript-all-in-one-for-dummies-cheat-sheet","canonicalUrl":"","seo":{"metaDescription":"This Cheat Sheet has handy info you can use when learning the basics of HTML, CSS, and JavaScript, including ready-to-go HTML templates.","noIndex":0,"noFollow":0},"content":"One of the bonuses you get when you tackle HTML, CSS, and JavaScript is that after you learn a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project.\r\n\r\nIt’s also worth your time to learn the most powerful CSS selectors, because you use those selectors all the time to speed up your work when you’re writing rules.\r\n\r\nProgramming errors, too, are a fact of web coding life, so understanding the most useful JavaScript debugging strategies can help you fix your code faster and get back to more creative pursuits.","description":"One of the bonuses you get when you tackle HTML, CSS, and JavaScript is that after you learn a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project.\r\n\r\nIt’s also worth your time to learn the most powerful CSS selectors, because you use those selectors all the time to speed up your work when you’re writing rules.\r\n\r\nProgramming errors, too, are a fact of web coding life, so understanding the most useful JavaScript debugging strategies can help you fix your code faster and get back to more creative pursuits.","blurb":"","authors":[{"authorId":11290,"name":"Paul McFedries","slug":"paul-mcfedries","description":" <p><b>Paul McFedries</b> is the owner of Logophilia Limited, a successful technical writing firm. He has 25 years&#8217; experience writing instructional computer books and is the author of over 100 books that have sold a combined 4 million copies worldwide.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/11290"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General Programming & Web Design","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[],"fromCategory":[{"articleId":265680,"title":"Using DevOps To Improve Engineering","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"How To Automate DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"How To Choose a Cloud Service Provider for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":299520,"slug":"html-css-javascript-all-in-one-for-dummies","isbn":"9781394164684","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1394164688/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1394164688/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1394164688-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1394164688/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1394164688/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/html-css-javascript-all-in-one-for-dummies-9781394164684-203x255.jpg","width":203,"height":255},"title":"HTML, CSS, & JavaScript All-in-One For Dummies","testBankPinActivationLink":"","bookOutOfPrint":true,"authorsInfo":"<p><b><b data-author-id=\"11290\">Paul McFedries</b></b> is the owner of Logophilia Limited, a successful technical writing firm. He has 25 years&#8217; experience writing instructional computer books and is the author of over 100 books that have sold a combined 4 million copies worldwide.</p>","authors":[{"authorId":11290,"name":"Paul McFedries","slug":"paul-mcfedries","description":" <p><b>Paul McFedries</b> is the owner of Logophilia Limited, a successful technical writing firm. He has 25 years&#8217; experience writing instructional computer books and is the author of over 100 books that have sold a combined 4 million copies worldwide.</p> ","hasArticle":false,"_links":{"self":"https://dummies-api.dummies.com/v2/authors/11290"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394164684&quot;]}]\" id=\"du-slot-6511f50f42930\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781394164684&quot;]}]\" id=\"du-slot-6511f50f42e7d\"></div></div>"},"articleType":{"articleType":"Cheat Sheet","articleList":[{"articleId":0,"title":"","slug":null,"categoryList":[],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/"}}],"content":[{"title":"Your ready-to-roll HTML template","thumb":null,"image":null,"content":"<p>All web pages use more or less the same basic HTML structure. This means you can get any new web project off on the right foot by first laying down a solid foundation that includes valid HTML and semantic page tags.</p>\n<p>Rather than create this foundation from scratch each time, you can save yourself some time along with wear and tear on your typing fingers by creating a template file that you can copy for each new project.</p>\n<p>To get you started, here are the HTML tags to add to your template:</p>\n<pre class=\"code\">&lt;!doctype html&gt;\r\n&lt;html lang=\"en\"&gt;\r\n &lt;head&gt;\r\n &lt;meta charset=\"utf-8\"&gt;\r\n &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\r\n &lt;title&gt;Barebones HTML Template&lt;/title&gt;\r\n &lt;style&gt;\r\n /*\r\n * Put your internal styles here or replace with\r\n * &lt;link href=\"filename.css\" rel=\"stylesheet\"&gt;\r\n */\r\n &lt;/style&gt;\r\n &lt;/head&gt;\r\n &lt;body&gt;\r\n &lt;header&gt;\r\n &lt;h1&gt;Site Title&lt;/h1&gt;\r\n &lt;/header&gt;\r\n &lt;nav&gt;\r\n Navigation links\r\n &lt;/nav&gt;\r\n &lt;main&gt;\r\n &lt;article&gt;\r\n &lt;h2&gt;Article Title&lt;/h2&gt;\r\n &lt;/article&gt;\r\n &lt;aside&gt;\r\n &lt;h3&gt;Aside Title&lt;/h3&gt;\r\n &lt;/aside&gt;\r\n &lt;/main&gt;\r\n &lt;footer&gt;\r\n Footer stuff\r\n &lt;/footer&gt;\r\n &lt;script&gt;\r\n /*\r\n * Your internal JavaScript goes here.\r\n * Alternatively, replace with\r\n * &lt;script src=\"filename.js\"&gt;&lt;/script&gt;\r\n */\r\n &lt;/script&gt; \r\n &lt;/body&gt;\r\n&lt;/html&gt;\r\n</pre>\n<p class=\"article-tips remember\">For the &lt;link&gt; and &lt;script&gt; tags, be sure to adjust the filenames as needed, and be sure to add the path to each file if you’ve stored them in subdirectories.</p>\n"},{"title":"15 must-know CSS selectors","thumb":null,"image":null,"content":"<p>CSS saves you oodles of time by making it easy to style page elements. CSS becomes even more powerful when you use selectors to specify which elements you want to work with.</p>\n<p>Here are the selectors you need to tape to your cat’s forehead so that they’re always handy:</p>\n<h3><strong>The class selector</strong></h3>\n<p>If you’ve used the <em>class</em> attribute to assign a class name to one or more page elements, you can target those elements by using a <em>class selector</em>:</p>\n<p>HTML:</p>\n<pre class=\"code\"> &lt;<em>element</em> class=\"<em>class-name</em>\"&gt;\r\n</pre>\n<p>CSS:</p>\n<pre class=\"code\"> .<em>class-name</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The id selector</strong></h3>\n<p>If you’ve used the <em>id</em> attribute to assign an ID to a page element, you can target that element by using an <em>id selector:</em></p>\n<p>HTML:</p>\n<pre class=\"code\"> &lt;<em>element</em> id=\"<em>id-name</em>\"&gt;\r\n</pre>\n<p>CSS:</p>\n<pre class=\"code\"> #<em>id-name</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The type selector</strong></h3>\n<p>To target every element that uses a particular element name (such as <em>header</em> or <em>div</em>), use the <em>type selector:</em></p>\n<pre class=\"code\"> <em>element</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The attribute equals selector</strong></h3>\n<p>To target every instance of an element that uses an attribute with a specified value, use the <em>attribute equals selector:</em></p>\n<pre class=\"code\"> <em>element</em>[<em>attr</em>=\"<em>value</em>\"] {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The descendant combinator</strong></h3>\n<p>To target every element that’s contained within (that is, is a descendant of) a specified ancestor element, use the <em>descendant combinator</em> (a space):</p>\n<pre class=\"code\"> <em>ancestor</em> <em>descendant</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The child combinator</strong></h3>\n<p>To target every element that resides one level below (that is, is a child of) a specified parent element, use the <em>child combinator</em> (&gt;):</p>\n<pre class=\"code\"> <em>parent</em> &gt; <em>child</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The subsequent-sibling combinator</strong></h3>\n<p>To target every sibling element that follows a reference element, use the <em>subsequent-sibling combinator</em> (~):</p>\n<pre class=\"code\"> <em>reference </em>~<em> target</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The next-sibling combinator</strong></h3>\n<p>To target the sibling element that comes immediately after a reference element, use the <em>next-sibling combinator</em> (+):</p>\n<pre class=\"code\"> <em>reference </em>+<em> target</em> {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The first-child or last-child pseudo-classes</strong></h3>\n<p>To target any child element that’s the first or last of a parent element’s children, use the <em>first-child </em>or <em>last-child pseudo-class</em>:</p>\n<pre class=\"code\"> <em>element</em>:first-child {\r\n <em>element</em>:last-child {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The nth-child or nth-last-child pseudo-class</strong></h3>\n<p>To target any child element that’s the nth or nth-last of a parent element’s children, use the <em>nth-child </em>or <em>nth-last-child pseudo-class</em>:</p>\n<pre class=\"code\"> <em>element</em>:nth-child(<em>n</em>) {\r\n <em>element</em>:nth-last-child(<em>n</em>) {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The </strong><strong>:is() </strong><strong>pseudo-class</strong></h3>\n<p>To target elements that match any of the selectors in a specified selector list and where the overall specificity of the selector is the highest weight of the items in the selector list, use the<strong> :is() </strong>pseudo-class:</p>\n<pre class=\"code\"> <em>element</em>:is(<em>selector-list</em>) {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The </strong><strong>:where() </strong><strong>pseudo-class </strong></h3>\n<p>To target elements that match any of the selectors in a specified selector list and where the overall specificity of the selector is 0, use the :where() pseudo-class:</p>\n<pre class=\"code\"> <em>element</em>:where(<em>selector-list</em>) {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The :not() pseudo-class </strong></h3>\n<p>To target elements that don’t match any of the selectors in a specified selector list, use the :not() pseudo-class:</p>\n<pre class=\"code\"> <em>element</em>:not(<em>selector-list</em>) {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n<h3><strong>The :has() pseudo-class </strong></h3>\n<p>To target an ancestor, parent, or previous sibling that has a descendant, child, or sibling (respectively) in a specified selector list, use the :has() pseudo-class:</p>\n<pre class=\"code\"> <em>element</em>:has(<em>selector-list</em>) {\r\n <em>property1</em>: <em>value1</em>;\r\n <em>property2</em>: <em>value2</em>;\r\n etc.\r\n }\r\n</pre>\n"},{"title":"Top 10 JavaScript debugging strategies","thumb":null,"image":null,"content":"<p>Given any nontrivial JavaScript code, it’s a rare (probably nonexistent!) script that runs perfectly the first (or even the tenth!) time.</p>\n<p>Script bugs happen to even the most experienced developers, so having errors in your code does not mean you’re a failure as a coder! All it means is that you’re a coder.</p>\n<p>But when bugs get into your code, you’ll want to exterminate them as quickly as you can. Here are ten debugging strategies that can help:</p>\n<ul>\n<li><strong>Get thee to your dev tools:</strong> All web page debugging begins with a visit to your web browser development tools. In every browser, the quickest way to open the dev tools is to right-click a page element and then click Inspect. You can also press Ctrl+Shift+I (Windows) or Option@@cmd+I (macOS).</li>\n<li><strong>The console is your best debugging friend:</strong> In your code, you can see the current value of a variable or object property by outputting that value to the dev tools Console tab:\n<pre class=\"code\">console.log(<em>output</em>);</pre>\n<ul>\n<li>output: The expression you want to print in the Console. The output expression can be a text string, a variable, an object property, a function result, or any combination of these.</li>\n</ul>\n</li>\n<li><strong>Give your code a break(point):</strong> Pausing your code enables you to see what’s going on and to run some commands in the console. You have two ways to pause your code mid-execution:\n<ul>\n<li><strong>Set a breakpoint:</strong> In the dev tools, open the file that contains the JavaScript code, locate the statement where you want to pause, and then click the line number to the left of that statement.</li>\n<li><strong>Add a</strong> <strong>debugger statement:</strong> In your JavaScript code, on the line just before the statement where you want to pause, add a debugger statement.</li>\n</ul>\n</li>\n<li><strong>Step through your code:</strong> Once you have some JavaScript code in break mode, use the dev tools execution controls to step through the code. You can step one statement at a time, step over functions, or step into functions.</li>\n<li><strong>Monitor variable and object property values:</strong> Either use console.log() statements to output values to the console or, when your code is in break mode, hover the mouse pointer over the variable or object to see its current value in a tooltip. You can also create watch expressions to monitor values.</li>\n<li><strong>Indent your code</strong><strong>.</strong> JavaScript code is immeasurably more readable when you indent the code within each statement block. Readable code is that much easier to trace and decipher, so your debugging efforts have one less hurdle to negotiate. Indenting each statement by two or four spaces is typical.</li>\n<li><strong>Break down complex tasks</strong><strong>.</strong> Don’t try to solve all your problems at once. If you have a large script or function that isn’t working right, test it in small chunks to try to narrow down the problem.</li>\n<li><strong>Break up long statements</strong><strong>.</strong> One of the most complicated aspects of script debugging is making sense out of long statements (especially expressions). The Console window can help (you can use it to print parts of the statement), but it’s usually best to keep your statements as short as possible. Once you get things working properly, you can often recombine statements for more efficient code.</li>\n<li><strong>Comment out problem statements</strong><strong>.</strong> If a particular statement is giving you problems, you can temporarily deactivate it by placing two slashes (//) at the beginning of the line. This tells JavaScript to treat the line as a comment. If you have a number of statements you want to skip, place/* at the beginning of the first statement and */ at the end of the last statement.</li>\n<li><strong>Use comments to document your scripts</strong><strong>.</strong> Speaking of comments, it’s a programming truism that you can never add enough explanatory comments to your code. The more comments you add, the easier your scripts will be to debug.</li>\n</ul>\n"}],"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0},"sponsorAd":"","sponsorEbookTitle":"","sponsorEbookLink":"","sponsorEbookImage":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":"Two years","lifeExpectancySetFrom":"2023-07-05T00:00:00+00:00","dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":299575}],"_links":{"self":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=0"},"next":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=10"},"last":{"self":"https://dummies-api.dummies.com/v2/categories/33592/categoryArticles?sortField=time&sortOrder=1&size=10&offset=1385"}}},"objectTitle":"","status":"success","pageType":"article-category","objectId":"33592","page":1,"sortField":"time","sortOrder":1,"categoriesIds":[],"articleTypes":[],"filterData":{"categoriesFilter":[{"itemId":0,"itemName":"All Categories","count":1395},{"itemId":33593,"itemName":"3D Printing","count":33},{"itemId":33594,"itemName":"App Development","count":85},{"itemId":34376,"itemName":"Blogging & Website Platforms","count":66},{"itemId":33595,"itemName":"C","count":17},{"itemId":33596,"itemName":"C#","count":29},{"itemId":33597,"itemName":"C++","count":63},{"itemId":33598,"itemName":"Cisco Programming","count":1},{"itemId":33599,"itemName":"Coding","count":106},{"itemId":34324,"itemName":"CSS3","count":4},{"itemId":33610,"itemName":"General Programming & Web Design","count":209},{"itemId":34511,"itemName":"Go Programming Language","count":1},{"itemId":33600,"itemName":"HTML","count":8},{"itemId":33601,"itemName":"HTML5","count":265},{"itemId":33602,"itemName":"Java","count":122},{"itemId":33603,"itemName":"JavaScript","count":87},{"itemId":33604,"itemName":"MATLAB","count":83},{"itemId":33592,"itemName":"Programming & Web Design","count":2},{"itemId":33606,"itemName":"Python","count":83},{"itemId":33607,"itemName":"R","count":99},{"itemId":33608,"itemName":"SQL","count":26},{"itemId":34338,"itemName":"Web Hosting","count":6}],"articleTypeFilter":[{"articleType":"All Types","count":1395},{"articleType":"Articles","count":1284},{"articleType":"Cheat Sheet","count":55},{"articleType":"Step by Step","count":56}]},"filterDataLoadedStatus":"success","pageSize":10},"adsState":{"pageScripts":{"headers":{"timestamp":"2024-05-02T15:50:01+00:00"},"adsId":0,"data":{"scripts":[{"pages":["all"],"location":"header","script":"<!--Optimizely Script-->\r\n<script src=\"https://cdn.optimizely.com/js/10563184655.js\"></script>","enabled":false},{"pages":["all"],"location":"header","script":"<!-- comScore Tag -->\r\n<script>var _comscore = _comscore || [];_comscore.push({ c1: \"2\", c2: \"15097263\" });(function() {var s = document.createElement(\"script\"), el = document.getElementsByTagName(\"script\")[0]; s.async = true;s.src = (document.location.protocol == \"https:\" ? \"https://sb\" : \"http://b\") + \".scorecardresearch.com/beacon.js\";el.parentNode.insertBefore(s, el);})();</script><noscript><img src=\"https://sb.scorecardresearch.com/p?c1=2&c2=15097263&cv=2.0&cj=1\" /></noscript>\r\n<!-- / comScore Tag -->","enabled":true},{"pages":["all"],"location":"footer","script":"<!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->\r\n<script type='text/javascript'>\r\n(function(){var g=function(e,h,f,g){\r\nthis.get=function(a){for(var a=a+\"=\",c=document.cookie.split(\";\"),b=0,e=c.length;b<e;b++){for(var d=c[b];\" \"==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};\r\nthis.set=function(a,c){var b=\"\",b=new Date;b.setTime(b.getTime()+6048E5);b=\"; expires=\"+b.toGMTString();document.cookie=a+\"=\"+c+b+\"; path=/; \"};\r\nthis.check=function(){var a=this.get(f);if(a)a=a.split(\":\");else if(100!=e)\"v\"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(\":\"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case \"v\":return!1;case \"r\":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(\":\")),!c}return!0};\r\nthis.go=function(){if(this.check()){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.src=g;document.body&&document.body.appendChild(a)}};\r\nthis.start=function(){var t=this;\"complete\"!==document.readyState?window.addEventListener?window.addEventListener(\"load\",function(){t.go()},!1):window.attachEvent&&window.attachEvent(\"onload\",function(){t.go()}):t.go()};};\r\ntry{(new g(100,\"r\",\"QSI_S_ZN_5o5yqpvMVjgDOuN\",\"https://zn5o5yqpvmvjgdoun-wiley.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_5o5yqpvMVjgDOuN\")).start()}catch(i){}})();\r\n</script><div id='ZN_5o5yqpvMVjgDOuN'><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>\r\n<!--END WEBSITE FEEDBACK SNIPPET-->","enabled":false},{"pages":["all"],"location":"header","script":"<!-- Hotjar Tracking Code for http://www.dummies.com -->\r\n<script>\r\n (function(h,o,t,j,a,r){\r\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\r\n h._hjSettings={hjid:257151,hjsv:6};\r\n a=o.getElementsByTagName('head')[0];\r\n r=o.createElement('script');r.async=1;\r\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\r\n a.appendChild(r);\r\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\r\n</script>","enabled":false},{"pages":["article"],"location":"header","script":"<!-- //Connect Container: dummies --> <script src=\"//get.s-onetag.com/bffe21a1-6bb8-4928-9449-7beadb468dae/tag.min.js\" async defer></script>","enabled":true},{"pages":["homepage"],"location":"header","script":"<meta name=\"facebook-domain-verification\" content=\"irk8y0irxf718trg3uwwuexg6xpva0\" />","enabled":true},{"pages":["homepage","article","category","search"],"location":"footer","script":"<!-- Facebook Pixel Code -->\r\n<noscript>\r\n<img height=\"1\" width=\"1\" src=\"https://www.facebook.com/tr?id=256338321977984&ev=PageView&noscript=1\"/>\r\n</noscript>\r\n<!-- End Facebook Pixel Code -->","enabled":true}]}},"pageScriptsLoadedStatus":"success"},"navigationState":{"navigationCollections":[{"collectionId":287568,"title":"BYOB (Be Your Own Boss)","hasSubCategories":false,"url":"/collection/for-the-entry-level-entrepreneur-287568"},{"collectionId":293237,"title":"Be a Rad Dad","hasSubCategories":false,"url":"/collection/be-the-best-dad-293237"},{"collectionId":295890,"title":"Career Shifting","hasSubCategories":false,"url":"/collection/career-shifting-295890"},{"collectionId":294090,"title":"Contemplating the Cosmos","hasSubCategories":false,"url":"/collection/theres-something-about-space-294090"},{"collectionId":287563,"title":"For Those Seeking Peace of Mind","hasSubCategories":false,"url":"/collection/for-those-seeking-peace-of-mind-287563"},{"collectionId":287570,"title":"For the Aspiring Aficionado","hasSubCategories":false,"url":"/collection/for-the-bougielicious-287570"},{"collectionId":291903,"title":"For the Budding Cannabis Enthusiast","hasSubCategories":false,"url":"/collection/for-the-budding-cannabis-enthusiast-291903"},{"collectionId":299891,"title":"For the College Bound","hasSubCategories":false,"url":"/collection/for-the-college-bound-299891"},{"collectionId":291934,"title":"For the Exam-Season Crammer","hasSubCategories":false,"url":"/collection/for-the-exam-season-crammer-291934"},{"collectionId":301547,"title":"For the Game Day Prepper","hasSubCategories":false,"url":"/collection/big-game-day-prep-made-easy-301547"}],"navigationCollectionsLoadedStatus":"success","navigationCategories":{"books":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/books/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/books/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/books/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/books/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/books/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/books/level-0-category-0"}},"articles":{"0":{"data":[{"categoryId":33512,"title":"Technology","hasSubCategories":true,"url":"/category/articles/technology-33512"},{"categoryId":33662,"title":"Academics & The Arts","hasSubCategories":true,"url":"/category/articles/academics-the-arts-33662"},{"categoryId":33809,"title":"Home, Auto, & Hobbies","hasSubCategories":true,"url":"/category/articles/home-auto-hobbies-33809"},{"categoryId":34038,"title":"Body, Mind, & Spirit","hasSubCategories":true,"url":"/category/articles/body-mind-spirit-34038"},{"categoryId":34224,"title":"Business, Careers, & Money","hasSubCategories":true,"url":"/category/articles/business-careers-money-34224"}],"breadcrumbs":[],"categoryTitle":"Level 0 Category","mainCategoryUrl":"/category/articles/level-0-category-0"}}},"navigationCategoriesLoadedStatus":"success"},"searchState":{"searchList":[],"searchStatus":"initial","relatedArticlesList":[],"relatedArticlesStatus":"initial"},"routeState":{"name":"ArticleCategory","path":"/category/articles/programming-web-design-33592/","hash":"","query":{},"params":{"category":"programming-web-design-33592"},"fullPath":"/category/articles/programming-web-design-33592/","meta":{"routeType":"category","breadcrumbInfo":{"suffix":"Articles","baseRoute":"/category/articles"},"prerenderWithAsyncData":true},"from":{"name":null,"path":"/","hash":"","query":{},"params":{},"fullPath":"/","meta":{}}},"profileState":{"auth":{},"userOptions":{},"status":"success"}}
Logo
  • Articles Open Article Categories
  • Books Open Book Categories
  • Collections Open Collections list
  • Custom Solutions

Article Categories

Book Categories

Collections

Explore all collections
BYOB (Be Your Own Boss)
Be a Rad Dad
Career Shifting
Contemplating the Cosmos
For Those Seeking Peace of Mind
For the Aspiring Aficionado
For the Budding Cannabis Enthusiast
For the College Bound
For the Exam-Season Crammer
For the Game Day Prepper
Log In
  • Home
  • Technology Articles
  • Programming & Web Design Articles

Programming & Web Design Articles

Ever wonder what makes the software, websites, and blogs you use every day function properly (or improperly)? It's programming. Our articles reveal the ins and outs of programming and web design.

Browse By Category

Go Programming Language

3D Printing

App Development

C

C#

C++

Cisco Programming

Coding

HTML

HTML5

Java

JavaScript

MATLAB

Python

R

SQL

General Programming & Web Design

CSS3

Web Hosting

Blogging & Website Platforms

Previous slideNext slide

Go Programming Language

3D Printing

App Development

C

C#

C++

Cisco Programming

Coding

HTML

HTML5

Java

JavaScript

MATLAB

Python

R

SQL

General Programming & Web Design

CSS3

Web Hosting

Blogging & Website Platforms

Articles From Programming & Web Design

page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
page 28
page 29
page 30
page 31
page 32
page 33
page 34
page 35
page 36
page 37
page 38
page 39
page 40
page 41
page 42
page 43
page 44
page 45
page 46
page 47
page 48
page 49
page 50
page 51
page 52
page 53
page 54
page 55
page 56
page 57
page 58
page 59
page 60
page 61
page 62
page 63
page 64
page 65
page 66
page 67
page 68
page 69
page 70
page 71
page 72
page 73
page 74
page 75
page 76
page 77
page 78
page 79
page 80
page 81
page 82
page 83
page 84
page 85
page 86
page 87
page 88
page 89
page 90
page 91
page 92
page 93
page 94
page 95
page 96
page 97
page 98
page 99
page 100
page 101
page 102
page 103
page 104
page 105
page 106
page 107
page 108
page 109
page 110
page 111
page 112
page 113
page 114
page 115
page 116
page 117
page 118
page 119
page 120
page 121
page 122
page 123
page 124
page 125
page 126
page 127
page 128
page 129
page 130
page 131
page 132
page 133
page 134
page 135
page 136
page 137
page 138
page 139
page 140

Filter Results

1,395 results
1,395 results
SQL SQL All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 04-12-2024

SQL is a popular and useful programming language. You can make SQL even more useful if you know the phases of SQL development, the criteria for normal forms, the data types used by SQL, a little bit about set and value functions, as well as some tips on how to filter tables with WHERE clauses.

View Cheat Sheet
Python Python All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 04-12-2024

Python is a flexible programming language that has become increasingly popular in the past few years. This cheat sheet is designed to give you a handy resource for common Python data types, Python operators, and Python functions. It includes Python data types, operators, special characters, f-strings, and functions for working with robots.

View Cheat Sheet
General Programming & Web Design Building DIY Websites For Dummies Cheat Sheet

Cheat Sheet / Updated 03-26-2024

If you want to build your own website from start to finish, this book serves as a great resource. It includes many secrets and best practices that web developers know and implement when building any quality website. This cheat sheet includes bits and pieces of what you'll find in the book.

View Cheat Sheet
WordPress WordPress All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 01-18-2024

Tailor your blog with WordPress software, whether you're writing, editing, or publishing WordPress site content. An understanding of WordPress's dashboard controls and of the types of content available to you helps you get the most out of your website. Also, when all else fails, it's good to know where you can turn to for help with WordPress.

View Cheat Sheet
General Programming & Web Design Web Coding and Development All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 01-05-2024

One of the handiest features of web coding and development is that once you’ve learned a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project. It’s also worth your time to learn how selectors work, because you use them to save you time both when you’re writing CSS rules and when you’re writing JavaScript code. Errors, too, are a fact of web coding life, so understanding the most common errors can help you debug your code faster and get back to more creative pursuits.

View Cheat Sheet
General Programming & Web Design Building Websites All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 11-13-2023

Note: The following cheat sheet is from Building Websites All-in-One For Dummies which published in 2012; therefore, this content may be outdated. For more current information on website building, please see HTML, CSS, & JavaScript All-in-One For Dummies. Whether complex or simple, websites require that you make decisions — such as color, theme, and tone — and that you juggle many pieces of the project — like code, style sheets, and graphics. Knowing which resources to turn to for help implementing HTML5, and a few key points about incorporating graphics and video, can help you.

View Cheat Sheet
Python Python 2.7 Keyword Subset and Examples

Article / Updated 10-04-2023

Programming is an important skill. Python will serve you well for years to come. The tables here give you the core words, built-ins, standard library functions, and operators that you'll use most when you're coding with Python. Python Core Words KeywordSummaryExample and Logical operator to test whether two things are both True. andx>2 and x<10 as Assign a file object to a variable. Used with with.Let your code refer to a module under a different name (also called an alias). Used with import. with open(<name of file>,<file mode>) as <object name>:import cPickle as pickle break Stop execution of a loop. for i in range(10): if i%2 ==0: break class Define a custom object. class <name of class>(object): ""Your docstring"" class MyClass(object): ""A cool function."" continue Skip balance of loop and begin a new iteration. for i in range(10): if i%2 ==0: continue def Define a function. def <name of function>(): ""Your docstring"" def my_function(): ""This does... "" elif Add conditional test to an if clause. See if. else Add an alternative code block. See if. for Create a loop which iterates through elements of a list (or other iterable). for <dummy variable name> in <sequence>:for i in range(10): from Import specific functions from a module without importing the whole module. from <module name> import <name of function or object>from random import randint global Make a variable global in scope. (If a variable is defined in the main section, you can change its value within a function.) global x if Create a condition. If the condition is True, the associated code block is executed. Otherwise, any elif commands are processed. If there are none, or none are satisfied, execute the else block if there is one. if : [elif : , ...][else: ]if x == 1: print("x is 1")elif x == 2: print("x is 2")elif x > 3: print("x is greater than 3")else print("x is not greater than 3, nor is it 1 one or 2") import Use code defined in another file without retyping it. import <name of module>import random in Used to test whether a given value is one of the elements of an object. 1 in range(10) is Used to test whether names reference the same object. x = Nonex is None # faster thanx == None lambda Shorthand function definition. Usually used where a function needs to be passed as an argument to another function. lamda :times = lambda x, y: x*ycommand=lambda x: self.draw_line(self.control_points) not Logical negation, used to negate a logical condition. Don't use for testing greater than, less than, or equal. 10 not in range(10) or Logical operator to test whether at least one of two things is True. orx<2 or x>10 pass Placeholder keyword. Does nothing but stop Python complaining that a code block is empty. for i in range (10): pass print Output text to a terminal. print("Hello World!") return Return from the execution of a function. If a value is specified, return that value, otherwise return None. return return x+2 while Execute a code block while the associated condition is True. while :while True: pass with Get Python to manage a resource (like a file) for you. with open(,) as : Extend Python's core functionality with these built-ins. Python Built-ins Built-inNotesExample False Value, returned by a logical operation or directly assigned. ok_to_continue = Falseage = 16old_enough = age >=21(evaluates comparison age>=21 and assigns the result to old_enough) None Value used when representing the absence of a value or to initialise a variable which will be changed later. Returned by functions which do not explicitly return a value. x = None True Value, returned by a logical operation. ok_to_continue = Trueage = 16old_enough = age >=21(evaluates comparison age>=21 and assigns the result to old_enough) __name__ Constant, shows module name. If it's not "__main__", the code is being used in an import. if __name__=="__main__": dir List attributes of an item. dir(<object name>) enumerate Iterate through a sequence and number each item. enumerate('Hello') exit Exit Python (Command Line) interpreter. exit() float Convert a number into a decimal, usually so that division works properly. 1/float(2) getattr Get an attribute of an object by a name. Useful for introspection. getattr(<name of object>, <name of attribute>) help Get Python docstring on object. help(<name of object>)help(getattr) id Show the location in the computer's RAM where an object is stored. id(<name of object>)id(help) int Convert a string into an integer number. int('0') len Get the number of elements in a sequence. len([0,1]) object A base on which other classes can inherit from. class CustomObject(object): open Open a file on disk, return a file object. open(, )open('mydatafile.txt', 'r') # read(opens a file to read data from)open('mydatafile.txt', 'w') # write(creates a new file to write to, destroys any existing file with the same name)open('mydatafile.txt', 'a') # append(adds to an existing file if any, or createsa new one if none existing already) print Reimplementation of print keyword, but as a function.Need to import from the future to use it (srsly!) from future import print_functionprint ('Hello World!') range Gives numbers between the lower and upper limits specified (including the lower, but excluding the upper limit). A step may be specified. range(10)range(5,10)range(1,10,2) raw_input Get some text as a string from the user, with an optional prompt. prompt = 'What is your guess? 'players_guess = raw_input(prompt) str Convert an object (usually a number) into a string (usually for printing). str(0) type Give the type of the specified object. type(0)type('0')type([])type({})type(()) Use the work that others have already done. Try these modules from the Python standard library. Selected Functions from the Standard Library ModuleWhat It DoesSample Functions/Objects os.path Functions relating to files and file paths. os.path.exists() pickle, cPickle Save and load objects to/from a file. pickle.load(), pickle.dump(, ) random Various functions relating to random numbers. random.choice(), random.randint(, ), random.shuffle() String Stuff relating to strings. string.printable sys Various functions related to your computer system. sys.exit() Time Time-related functions. time.time() Tkinter User interface widgets and associated constants. Tkinter.ALLTkinter.BOTHTkinter.CENTERTkinter.ENDTkinter.HORIZONTALTkinter.LEFTTkinter.NWTkinter.RIGHTTkinter.TOPTkinter.YTkinter.Button(,text=)Tkinter.Canvas(, width=, height=)Tkinter.Checkbutton(, text=)Tkinter.Entry(, width=),Tkinter.Frame()Tkinter.IntVar()Tkinter.Label(, text = )Tkinter.mainloop()Tkinter.Menu()Tkinter.OptionMenu(, None, None)Tkinter.Scale(, from_=, to=)Tkinter.Scrollbar()Tkinter.StringVar()Tkinter.Tk() Add, subtract, divide, multiply, and more using these operators. Python Operators OperatorNameEffectExamples + Plus Add two numbers.Join two strings together. Add: >>> 1+12Join: >>> 'a'+'b''ab' – Minus Subtract a number from another.Can't use for strings. >>> 1-10 * Times Multiply two numbers.Make copies of a string. Multiply: >>> 2*24Copy: >>> 'a'*2'aa' / Divide Divide one number by another.Can't use for strings. 1/2 # integer division:Answer will be rounded down.1/2.0 # decimal division1/float(2) # decimal division % Remainder (Modulo) Give the remainder when dividing the left number by the right number.Formatting operator for strings. >>> 10%31 ** Power x**y means raise x to the power of y.Can't use for strings. >>> 3**29 = Assignment Assign the value on the right to the variable on the left. >>> a = 1 == Equality Is the left side equal to the right side? Is True if so; is False otherwise. >>> 1 == 1True>>> 'a' == 'a'True != Not equal Is the left side not equal to the right side? Is True if so; is False otherwise. >>> 1 != 1False>>> 1 != 2True>>> 'a' != 'a'True > Greater than Is the left side greater than the right side?>= means greater than or equal to >>> 2 > 1True < Less than Is the left side less than the right side?<= means less than or equal to >>> 1 < 2True & (or and) And Are both left and right True?Typically used for complex conditions where you want to do something if everything is True:while im_hungry and you_have_food: >>> True & TrueTrue>>> True and FalseFalse >>> True & (1 == 2)False | (or or) Or Is either left or right True?Typically used for complex conditions where you want at least one thing to be True:while im_bored or youre_bored: >>> True | FalseTrue>>> True or FalseTrue>>> False | FalseFalse>>> (1 == 1) | FalseTrue

View Article
Python Python for Data Science For Dummies Cheat Sheet

Cheat Sheet / Updated 10-03-2023

Python is an incredible programming language that you can use to perform data science tasks with a minimum of effort. The huge number of available libraries means that the low-level code you normally need to write is likely already available from some other source. All you need to focus on is getting the job done. With that in mind, this Cheat Sheet helps you access the most commonly needed reminders for making your programming experience fast and easy.

View Cheat Sheet
HTML How to Add Sound to Your Web Site Using HTML

Article / Updated 09-29-2023

There are plusses and minuses of adding sound to your Web page, but if you decide adding sound is of value to your Web page visitors, HTML offers two competing ways to add it: with the <bgsound> tag and with the embed tag. The <bgsound> tag works well and has useful options for controlling sound, but it’s not supported by all browsers. This example uses the <embed> tag, which is not officially supported by the HTML standard at all, but it works in most browsers. <embed> has options for different media players, such as Windows Media Player or Apple QuickTime. Follow these steps to add sound to a Web page in a text editor: Open your Web page in Notepad. Let your Web page’s user know they can stop sound from playing in your Web page by clicking the Stop button in their browsers. Enter the <embed> tag and a link to the sound file you want to use. An example looks like this: <embed src=<i>“pathname/filename”</i>>, <i>“pathname/filename”</i> is a link to the sound file. The simplest way to be sure you have the link right is to place the sound file in the same folder as the Web page; that way the link is simply the filename. Click File→Save and reopen the file. The sound should play. Test the link right away to be sure it will work. If the sound doesn’t play, experiment to make sure you have the path right and that sound plays on your machine. To make sure you have the link right, put the file in the same folder as your Web page and simplify the link. To make sure that sound playback works on your machine, navigate to the file in Windows Explorer and click it. It should play. If not, identify and fix the files affecting sound playback on your machine.

View Article
General Programming & Web Design HTML, CSS, & JavaScript All-in-One For Dummies Cheat Sheet

Cheat Sheet / Updated 09-25-2023

One of the bonuses you get when you tackle HTML, CSS, and JavaScript is that after you learn a few basics, you can apply those basics to any project. A good example is the underlying structure of a page, which uses the same set of standard HTML tags, no matter how large or small the project. It’s also worth your time to learn the most powerful CSS selectors, because you use those selectors all the time to speed up your work when you’re writing rules. Programming errors, too, are a fact of web coding life, so understanding the most useful JavaScript debugging strategies can help you fix your code faster and get back to more creative pursuits.

View Cheat Sheet
page 1
page 2
page 3
page 4
page 5
page 6
page 7
page 8
page 9
page 10
page 11
page 12
page 13
page 14
page 15
page 16
page 17
page 18
page 19
page 20
page 21
page 22
page 23
page 24
page 25
page 26
page 27
page 28
page 29
page 30
page 31
page 32
page 33
page 34
page 35
page 36
page 37
page 38
page 39
page 40
page 41
page 42
page 43
page 44
page 45
page 46
page 47
page 48
page 49
page 50
page 51
page 52
page 53
page 54
page 55
page 56
page 57
page 58
page 59
page 60
page 61
page 62
page 63
page 64
page 65
page 66
page 67
page 68
page 69
page 70
page 71
page 72
page 73
page 74
page 75
page 76
page 77
page 78
page 79
page 80
page 81
page 82
page 83
page 84
page 85
page 86
page 87
page 88
page 89
page 90
page 91
page 92
page 93
page 94
page 95
page 96
page 97
page 98
page 99
page 100
page 101
page 102
page 103
page 104
page 105
page 106
page 107
page 108
page 109
page 110
page 111
page 112
page 113
page 114
page 115
page 116
page 117
page 118
page 119
page 120
page 121
page 122
page 123
page 124
page 125
page 126
page 127
page 128
page 129
page 130
page 131
page 132
page 133
page 134
page 135
page 136
page 137
page 138
page 139
page 140

Quick Links

  • About For Dummies
  • Contact Us
  • Activate a Book Pin

Connect

About Dummies

Dummies has always stood for taking on complex concepts and making them easy to understand. Dummies helps everyone be more knowledgeable and confident in applying what they know. Whether it's to pass that big test, qualify for that big promotion or even master that cooking technique; people who rely on dummies, rely on it to learn the critical skills and relevant information necessary for success.

Copyright @ 2000-2024 by John Wiley & Sons, Inc., or related companies. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.

Terms of Use
Privacy Policy
Cookies Settings
Do Not Sell My Personal Info - CA Only