[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-496279-105":3,"doc-detail-496279-en":81,"detail-sidebar-cat-0-en-105":97},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","6100a-final-review","6.100A Final Review","","Final review notes covering core programming concepts and evaluation semantics. The material distinguishes declarative knowledge from imperative “how-to” knowledge, then introduces expressions and statements, primitive types (Boolean, strings, numbers, None), and key type-issue behaviors such as integer versus float division and casting. It also summarizes arithmetic, string, comparison, and logical operations, and explains numeric representations in binary for integers and IEEE-like float structure using mantissa and exponent, including common floating-point approximation pitfalls.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/6100a-final-review/496279/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/6100a-final-review/496279.png","ImageObject",300,407,{"name":42,"@type":43},"Cart","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-09","2026-10-02",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is the difference between declarative knowledge and imperative knowledge in this review?","Question",{"text":63,"@type":64},"Declarative knowledge states facts. Imperative knowledge provides recipes or “how-to” instructions for doing something.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does integer division differ from float division?",{"text":68,"@type":64},"Integer division truncates the result (e.g., 1 // 2 = 0). Float division produces a fractional value (e.g., 1 / 2 = 0.5) and integer division may be implicitly cast to float depending on operands.",{"name":70,"@type":61,"acceptedAnswer":71},"Why can floating-point equality fail in practice?",{"text":72,"@type":64},"Floating-point numbers can be approximations, so values that should be mathematically equal may differ slightly (e.g., 2.0000000000000004 is not equal to 2.0).","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},496279,1791386831,{"code":4,"msg":82,"data":83},"success",{"doc_id":79,"user_id":84,"nickname":42,"user_avatar":85,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":86,"file_id":87,"file_url":88,"file_type":89,"file_size":90,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":7,"language":91,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":92,"faqs":93,"seo_title":94,"seo_description":12,"update_tm":95,"read_time":96,"preview_page_count":4},18829141979164,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","6.100A Final Review  \nType of knowledge  \nDeclarative knowledge-a statement of fact  \n● Stata is building 32  \nImperative knowledge-a recipe,‘how-to’ knowledge  \n1. Start at Student Center  \n2. Walk down Mass Ave, towards Vassar St  \n3. Make a right on Vassar  \n4. Walk until you see a funky-looking building Programming is about writing recipes to generate facts!  \n2  \nExpressions and Statements  \nExpression-combination of objects and operators, and can be evaluated to a value  \n● 3 + 5  \n● a or (True and b)  \nStatements-instructs the interpreter to perform some action  \n● print(3 + 5)  \n● return a or (True and b)  \n3  \nPrimitive Types  \n1) Boolean → True, False  \n2) Strings →“abc”,“123”,“@\\#%!$&@*”  \n3) Numbers:  \na) ints: 0, 1, 2, 3  \nb) ﬂoats: 1., 1.46, 8.76, 1.1111  \n4) None  \n4  \nType Issues  \na . 1 // 2 = 0 (integer division)  \nb. 1.0 // 2 = 0.0 (integer division casted (implicitly) to ﬂoat)  \nc . 1 / 2 = 0.5 (ﬂoat division)  \n[d. int(1 / 2) = 0 (casting)](d. int(1 / 2) = 0 (casting))  \nNOTE: integer division truncates the answer – it does NOT round to nearest int (use round for that)  \n7 / 3 = 2.33333333  \n7 // 3 = 2  \n7 / 4 = 1.75  \n7 // 4 = 1  \n5  \nOperations  \n● Arithmetic operations (follow order of operations / PEMDAS rules)  \n○ +, -, *, /  \n○ ** for exponents  \n○ % modulo to get remainder  \n● String operations  \n○ + for concatenation  \n○ * to repeat  \n● Boolean comparators  \n○ >, >=, \u003C, \u003C=, ==, !=  \n● Logical operators  \n○ and, or, not  \n6  \nRepresenting Numbers-Binary  \nIntegers are represented in base 2 , also known as binary:  \n1 0 1 1 0 1 0 1 = 181  \n27 26 25 24 23 22 21 20  \n128 + 0 + 32 + 16 + 0 + 4 + 0 + 1  \n7  \nRepresenting Numbers-Floats  \nTwo parts, the mantissa and the exponent, both represented in binary  \nM * 2 p → ( M, p )  \nmantissa exponent  \n1.25 = 5 * 2-2 = (101, -10)  \n8  \nT/F Question!  \nT/F Question: The value of ‘math.sqrt(2.0)*math.sqrt(2.0) == 2.0’ is True.  \nFalse! 2.0000000000000004 != 2.0  \n9  \nApproximation-Floats  \n10","cbCaifTwL3h6dINX","https://ap.wps.com/l/cbCaifTwL3h6dINX","pdf",1090337,"English","# 6.100A Final Review\n## Type of Knowledge\n## Expressions and Statements\n## Primitive Types\n## Type Issues\n## Operations\n## Representing Numbers - Binary\n## Representing Numbers - Floats\n## Approximation - Floats","[{\"question\":\"What is the difference between declarative knowledge and imperative knowledge in this review?\",\"answer\":\"Declarative knowledge states facts. Imperative knowledge provides recipes or “how-to” instructions for doing something.\"},{\"question\":\"How does integer division differ from float division?\",\"answer\":\"Integer division truncates the result (e.g., 1 // 2 = 0). Float division produces a fractional value (e.g., 1 / 2 = 0.5) and integer division may be implicitly cast to float depending on operands.\"},{\"question\":\"Why can floating-point equality fail in practice?\",\"answer\":\"Floating-point numbers can be approximations, so values that should be mathematically equal may differ slightly (e.g., 2.0000000000000004 is not equal to 2.0).\"}]","6.100A Final Review | PDF",1790930269,265,{"code":4,"msg":82,"data":98},[99,103,107,110,115,120,125,130,135,138,142],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":100,"show_sort_weight":101,"slug":102},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":104,"show_sort_weight":105,"slug":106},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":108,"slug":109},70,"exam",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},5,"Comic",60,"comic",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},6,"Technology",50,"technology",{"id":121,"doc_module":4,"doc_module_name":25,"category_name":122,"show_sort_weight":123,"slug":124},7,"Healthcare",40,"healthcare",{"id":126,"doc_module":4,"doc_module_name":25,"category_name":127,"show_sort_weight":128,"slug":129},8,"Research & Report",30,"research-report",{"id":131,"doc_module":4,"doc_module_name":25,"category_name":132,"show_sort_weight":133,"slug":134},9,"Religion & Spirituality",20,"religion-spirituality",{"id":133,"doc_module":4,"doc_module_name":25,"category_name":136,"show_sort_weight":133,"slug":137},"World Cup","world-cup",{"id":139,"doc_module":4,"doc_module_name":25,"category_name":140,"show_sort_weight":139,"slug":141},10,"Lifestyle","lifestyle",{"id":143,"doc_module":4,"doc_module_name":25,"category_name":144,"show_sort_weight":111,"slug":145},19,"General","general"]