[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-670915-105":59,"doc-detail-670915-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","python-cheat-sheet-quick-reference-670915","Python Cheat Sheet - Quick Reference","","Concise Python cheat sheet covering core essentials for beginners. It summarizes fundamental data types (string, integer, float, boolean) and how values appear in common editor themes. It also reviews basic math and randomization, including operators (+, -, *, /, %, **), modulo, exponentiation, and simple string concatenation with type conversion via str(). Finally, it explains variable creation and naming rules plus block structure for if statements, loops, functions, and events, emphasizing Python’s whitespace and indentation requirements.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/python-cheat-sheet-quick-reference-670915/670915/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/python-cheat-sheet-quick-reference-670915/670915.png","ImageObject",300,407,{"name":92,"@type":93},"Stanley","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-04","2026-11-01",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are the four basic Python data types shown in the cheat sheet?","Question",{"text":112,"@type":113},"The sheet lists strings, integers, floats, and booleans. Strings use quotes, integers are whole numbers, floats include decimals, and booleans are True/False with a capital T or F.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which math operators does the cheat sheet cover?",{"text":117,"@type":113},"It covers addition (+), subtraction (-), multiplication (*), division (/), modulo/remainder (%), and exponentiation (**). Examples show how each operator transforms two numbers.",{"name":119,"@type":110,"acceptedAnswer":120},"What are the variable naming rules and how are blocks structured?",{"text":121,"@type":113},"Variable names cannot be in quotes, cannot contain spaces (use underscores instead), and cannot begin with numbers. For blocks like if/loops/functions/events, the first line ends with a colon and all code inside must be indented four spaces.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},670915,1793572692,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":24,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":143},2336477405376,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","PYTHON CHEAT SHEET  \nDATA TYPES  \nStudents need to be aware of 4 data types:  \n· String ➔ “this is a string” ; you can use either single quotes ‘ ‘ or double quotes ” “  \n· Integer ➔ 12 ; an integer is a whole number, such as 12, 0 or-4  \n· Float ➔ 3.14 ; a float is any number with decimals  \n· Boolean ➔ True ; note True and False require a capital T or capital F  \nColors in the Codesters text editor are related to type:  \n· “strings are green”  \n· numbers like 12 or 3.14 are blue  \n· Booleans like True and False are red  \n· variable names are orange  \n· everything else is white including functions, classes, punctuation, and reserved words  \nPYTHON CHEAT SHEET  \nMATH AND RANDOM  \n6 + 3 ➔ 9 + addition  \n6 – 3 ➔ 3 – subtraction  \n6 * 3 ➔ 18 * multiplication  \n6 / 3 ➔ 2 / division  \n7 % 3 ➔ 1 % remainder (modulo)  \n6 ** 3 ➔ 196 ** exponent  \nrandom. randint(1, 10) ➔ creates a random integer between 1 and 10 random. rand() ➔ creates a random float (decimal) between 0 and 1 “Hello” + ” world!” ➔ Hello world! +combine two strings  \n“I am “ + str(13) ➔ I am 13 str( ) when combining a string and an integer with +  \nPYTHON CHEAT SHEET  \nVARIABLES  \nVariables let you store a piece of data to use later. This data can also change over the course of a program, so it’s useful for keeping track of things like scores. To create a variable, just type the name of the variable followed by an equals sign and a value. For example:  \n· fav_class = “coding”  \n· score = 14  \n3 rules for naming variables:  \n1) Do not put variable names in quotes  \n2) Variable names cannot contain spaces, use underscores _ instead  \n3) Variable names cannot begin with numbers For Example:  \n· “result” = 12 ; must be ➔ result = 12  \n· my name = “Codesters” ; must be ➔ my_name = “Codesters”  \n· 3rd_example = True ; must be ➔ third_example = True  \nPYTHON CHEAT SHEET  \nBLOCKS (If statements, Loops, Functions, and Events)  \nIf Statements let you execute or skip a group of commands depending on whether the condition you provide is true or false.  \n· For example – this tests whether you guess the correct answer “blue”.  \n· You can use the following comparisons and logical operations:== equal != not equal  \n> greater than >= greater than or equal to \u003C less than \u003C= less than or equal to  \nand or  \nLoops let you execute a group of commands multiple times.  \n· For example – this tells the sprite to count to 5.  \n· For example – this tells the sprite to say each letter in “Codesters”.  \nFunctions let you create a group of commands that you can run later.  \n· For example, this function squares a number, says the square, then returns the result.  \nEvents let you create a group of commands that will run when certain things happen on the stage, orthe user presses a particular button.  \nWhitespace and formatting blocks  \n· Python is very particular about whitespace. All code inside of these blocks must be indented four spaces.  \n· Codesters will highlight the whitespace in these blocks. If your highlighting is missing, check your whitespace.  \n· The first line of all these blocks always ends in a colon.","cbCaiiv8PWpG3bq7","https://ap.wps.com/l/cbCaiiv8PWpG3bq7","pdf",193615,"English","# Data Types\n# Math and Random\n# Variables\n# Blocks (If statements, Loops, Functions, and Events)","[{\"question\":\"What are the four basic Python data types shown in the cheat sheet?\",\"answer\":\"The sheet lists strings, integers, floats, and booleans. Strings use quotes, integers are whole numbers, floats include decimals, and booleans are True/False with a capital T or F.\"},{\"question\":\"Which math operators does the cheat sheet cover?\",\"answer\":\"It covers addition (+), subtraction (-), multiplication (*), division (/), modulo/remainder (%), and exponentiation (**). Examples show how each operator transforms two numbers.\"},{\"question\":\"What are the variable naming rules and how are blocks structured?\",\"answer\":\"Variable names cannot be in quotes, cannot contain spaces (use underscores instead), and cannot begin with numbers. For blocks like if/loops/functions/events, the first line ends with a colon and all code inside must be indented four spaces.\"}]","Python Cheat Sheet - Quick Reference | PDF",13]