{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2023-08-26T13:56:04.230460+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":912,"instructions":"## Values Represent the World\n\n![A map of the earth, but the continents are drawn with 1s and 0s.](intro_values_continents.png)\n\nProgramming is all about inputting data so that we can manipulate it to get some output.\nTherefore, we use values to represent the real world as data in the computer.\n\n## Values\n\n![Three images are shown. Each image is a picture with an arrow pointing to a data representation of the concept. The first picture is a thermometer pointing to the number 23.4 (representing the current temperature). The second picture is an old woman pointing to the number 74 (representing her age). The third picture is a book pointing to the introductory text from a book.](intro_values_data_representation.png)\n\nValues can represent anything in the real world that we can measure and concretely describe.\nDistances, temperatures, peoples' ages, our names, even the text of entire books.\n\n## Writing Values\n\n```python example-values\n74\n23.4\n\"Hello world\"\n```\n\nWhen we write values directly in code, we call them \"literal values,\" as opposed to being received as input from a user.\nThe values are literally written in the code.\nSometimes, we also call this \"hard coding a value.\" Hard-coded values are useful for developing simple programs.\nHowever, they are not very exciting on their own.\nTry running the code shown.\nWhat do you notice in the console? Since we have not told Python to print anything, and we have not requested any kind of user input, nothing will appear in the console.\n\n## Printing Values\n\n```python printing-values\nprint(74)\nprint(23.4)\nprint(\"Hello world\")\n```\n\nOnce we have put data into the computer as values, we need to do something with those values.\nA very simple action is to print the values.\nSoon, we will learn more complex actions.\nReview these examples of how we can write literal values and then print them using your REPL editor on the right side of the screen.\n\n## Abstraction\n\n* Abstraction: Representing the real world as data by ignoring details\n\nWhen computer scientists use data to represent reality, they are removing extraneous details.\nWhen we use the value 74 to represent someone's age, we are not including any information about how they lived those 74 years.\nIf we describe the current temperature as 23.4, the computer does not understand whether that is hot or cold.\nThis process of reducing detail to make the information easier to fit inside a computer is called _abstraction_.\nAlthough that word might sound a little complicated, the definition is quite simple.\n\nIn your literature class, when you summarize a novel for a book review or essay, you are using abstraction.\nIn programming, abstraction is the process of representing information about the real world inside of a computer by choosing to ignore unnecessary details.\nThe details that will be necessary or unnecessary are relative to whatever problem the program is meant to solve.\nTo determine how old someone will be next year, we only need to know how old they are \u2014 not how they celebrated their birthday last year or how many times they have been to Canada.\nBy abstracting away those other details, it is easy to represent someone's age in the computer.\n\n## Understanding Values\n\n![Picture of a person holding up the number 17 on a piece of paper, with multiple thought bubbles offering conflicting views on what the data represents.](intro_values_mystery_number.png)\n\nIt is very easy to put literal values into a program.\nHowever, it is very difficult to immediately understand what those values mean.\nIt is up to us programmers to communicate the meaning of values.\nThe value 17 could be used to represent the age of a person, the age of a dog, the amount of money in a wallet, or the number of times they have traveled to Canada.\nWe will learn more ways to write programs so that it is easier to understand what a value represents.\nFor now, though, it is important to understand that values on their own have no meaning.\n\n## Summary\n\n- We can write literal values in source code and print them to display the data to the user.\n- When we capture information from the real world in this way, we say that we are creating an \"Abstraction\" of reality.\n- The process of abstracting removes unnecessary data that is not relevant to the current problem, although sometimes that loss of context can make it harder to interpret values on their own.","ip_ranges":"","name":"1A4) Values Reading","on_change":"","on_eval":"","on_run":"","owner_id":1,"owner_id__email":"acbart@udel.edu","points":0,"public":true,"reviewed":false,"sample_submissions":[],"settings":"{\n  \"header\": \"Values\",\n  \"slides\": \"bakery_intro_values.pdf\",\n  \"youtube\": {\n    \"Bart\": \"ttA4_sRXBD0\",\n    \"Amy\": \"yZc1qC44kik\"\n  },\n  \"video\": {\n    \"Bart\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_values-Bart.mp4\",\n    \"Amy\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_values-Amy.mp4\"\n  },\n  \"summary\": \"In this lesson, you will learn about how data is fundamentally represented in computers as values.\",\n  \"small_layout\": true\n}","starting_code":"","subordinate":true,"tags":[],"type":"reading","url":"bakery_intro_values_read","version":9},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":912,"assignment_version":9,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T14:01:57.096092+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T14:01:57.096092+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2036936,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-7a5f4868-d406-4df1-ad78-757b21a9e424","user_id":2044668,"user_id__email":"","version":0},"success":true}
