{"assignment":{"_schema_version":2,"course_id":37,"date_created":"2022-06-28T19:00:00+00:00","date_modified":"2023-08-26T13:53:02.056358+00:00","extra_instructor_files":"","extra_starting_files":"","forked_id":null,"forked_version":null,"hidden":false,"id":904,"instructions":"## What is a Programming Language?\n\n![Picture of woman writing some instructions in pseudocode on a computer.](intro_programs_what_is_pl.png)\n\nPrograms are created by writing instructions in a _programming language_, like how movie scripts are written in human spoken languages like English.\nProgramming languages were created by computer scientists, to make it easy to write instructions that a computer can understand.\nA computer can then run these programs - if they are written correctly.\n\n## Python and Its Competition\n\n![Collage of icons from many different programming languages, including Java, Ruby, C++, PHP, and JavaScript. In the center, Python's icon is circled.](intro_programs_languages.png)\n\nIn this course, you are learning a programming language named Python.\nHowever, there are many programming languages out there.\nThis diagram shows the symbols of a bunch of other possible programming languages that you could learn instead.\nYou might be wondering why Python is a good language to learn if there are so many options.\n\n## Why Python?\n\n![Three headings on top of three pictures: first is popular over a ranking of different languages that has Python in the lead; second is useful ver a list of application areas that python is useful in including scientific computing, web servers, data science, game development, and scripting languages; third is friendly over a pair of smiling little snakes.](intro_programs_popular_useful_friendly.png)\n\nFirst, Python is one of the most popular languages in the world; in fact, according to some metrics, it might be THE most popular programming language in the world.\nSecond, it has a huge number of tools that make it useful for a wide range of problems in scientific computing, data science, web development, and much more.\nThird, it is sometimes called a \"friendly\" language for beginners, because many people have found it easier to learn than other languages despite being so powerful.\n\n## Python is a Language and a Tool\n\n1) Python is a **programming language**.\n2) Python is a **tool that runs programs**.\n\nPython is actually two things:\nFirst, as a programming language, Python is a set of rules for writing Python programs.\nSecond, Python is also a program that can execute programs written according to the rules of the Python programming language.\nTherefore, we will sometimes refer to Python as a language, and sometimes refer to Python as a tool for running programs.\nBefore we explain what it means to run a program, let us talk about programming languages a little more.\n\n## A Language for Instructions\n\n![A balancing scale with two unequal sides is shown. On the left side, the Human Languages list is shown with the words intructions, poetry, debate and ellipsis. On the right side, the Programming Languages list is shown with only the word instructions.](intro_programs_human_computer_languages.png)\n\nHuman languages, like English or Spanish, can be used to talk about many complex ideas.\nHowever, programming languages are good for only one thing: giving instructions to a computer to solve a problem.\nWe don't use programming languages to talk to each other the same way we do human languages.\nThat's because programming languages have a small vocabulary and limited grammar.\n\n## A Small Language\n\n![An adult is giving instructions to a small child, saying \"Sum up all the numbers on that paper\". The child looks confused and has thought balloons that make it clear they do not understand the words \"sum\", \"paper\", or \"all\".](intro_programs_child_instructions.png)\n\nImagine you're giving commands to a very small child in English.\nThe child only knows a few words.\nIf they don't know a word, you will have to explain new words to them using words they already understand.\nProgramming languages are like this: you build new words using a small set of original words.\nMost words and ideas that we take for granted as smart humans are not usable in a programming language unless we add them ourselves based on existing words.\nBasically, you can never underestimate how little a computer will understand when it comes to a programming language.\n\n## Rules\n\n* **Syntax**: grammar, spelling, punctuation\n* **Semantics**: logic, making sense, intent\n\nProgramming languages have very strict rules.\nThis is like how we have rules in English.\nThere are two kinds of rules: syntax and semantics.\n\n## Syntax\n\n![The nonsense text \"Run can . upwAys the, to healp?!?\" is shown, with speech bubbles annotating various syntactic errors. In particular, the bubbles point to a bad period, bad capitalization, and bad spelling.](intro_programs_bad_syntax.png)\n\nIn English, we follow grammar rules about how we can structure our sentences.\nThe sentence shown here is not grammatically correct English, so we would reject it.\nSimilarly, in Python, we use symbols, spaces, and words in very precise ways.\nUsing them incorrectly will give you a \"syntax error.\"\nYou will probably make many syntax errors as you learn to program.\n\n## Semantics\n\n![The nonsense text \"Colorless green ideas sleep furiously\" is shown, with speech bubbles annotating various semantic errors. In particular, it highlights that \"ideas can't sleep\", you can't have something that is \"colorless bug green\" and it is meaningless to be \"sleeping furiously\".](intro_programs_bad_semantics.png)\n\nAlthough the sentence here follows grammar rules, it doesn't make any sense.\nThis is the idea of semantics - the rules concerned with meaning.\nIt is very easy to write perfectly valid sentences in Python that accomplish nothing at best and hurt things at worst.\nYou need to think critically when programming to recognize when you've written instructions that make no sense.\n\n## Programs are Text\n\n![An arrow is drawn between the text of a program and a photo of someone writing an essay by hand, relating that they are similar.](intro_programs_are_text.png)\n\nWhen you write a Python program, you are just writing some text.\nThat text needs to be valid Python text, following all its syntax rules.\nBut that means it's not that different from an essay you might write in your own language.\n\n## Executing a Program\n\n![A picture of a program's source code, with an arrow pointing downward next to it.](intro_programs_executing_lines.png)\n\nOnce a program is written according to the Python language rules, the program can be executed.\nThis means that the computer will read the text of the program line by line and perform each step.\nThis is just like following the steps of a recipe or instructions; just like a human, the computer will do each step one at a time.\n\n## Terminology\n\n* **Run**: Perform each step of a program line-by-line.\n* **Execute**: Synonym for \"run\".\n* **Kill**: To stop a program.\n\nWhen we want to use a program, we will say the program is \"run\" or \"executed.\" Either a program will end on its own, or we will have to stop it ourselves, which is sometimes referred to as \"killing\" a program.\n\n## Programming Environments\n\n![Screenshot of the BlockPy programming environment, with callouts annotating the output area, the run button, and the program editor.](intro_programs_blockpy.png)\n\nTechnically, you can write programs in a text editor and then run them with Python separately.\nHowever, most programmers use a _programming environment_ that makes it very easy to write programs and then press a single button to run them.\nUsually, running a program causes some kind of visual output, although this is not always guaranteed.\nThis screenshot shows the BlockPy programming environment, which we will use to write and run basic programs so we can view their output.\n\n## Summary\n\nThrough this lesson, you learned that:\n\n-   By writing programs in a language like Python, programmers can give precise instructions that computers can execute.\n-   Python is a great language to learn because it is popular, relatively easy to learn, and yet powerful.\n","ip_ranges":"","name":"1A2) Programming 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\": \"Lesson 1A2) Programming\",\n  \"youtube\": {\n    \"Bart\": \"4swXT8qhb9w\",\n    \"Amy\": \"ZDfWDWEdW44\"\n  },\n  \"video\": {\n    \"Bart\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_programs-Bart.mp4\",\n    \"Amy\": \"https://blockpy.cis.udel.edu/videos/bakery_intro_programs-Amy.mp4\"\n  },\n  \"slides\": \"bakery_intro_programs.pdf\"\n}","starting_code":"","subordinate":true,"tags":[],"type":"reading","url":"bakery_intro_programs_read","version":8},"ip":"216.73.216.157","submission":{"_schema_version":3,"assignment_id":904,"assignment_version":8,"attempts":0,"code":"","correct":false,"course_id":37,"date_created":"2026-05-20T18:20:13.862134+00:00","date_due":"","date_graded":"","date_locked":"","date_modified":"2026-05-20T18:20:13.862134+00:00","date_started":"","date_submitted":"","endpoint":"","extra_files":"","feedback":"","grading_status":"NotReady","id":2037063,"score":0.0,"submission_status":"Started","time_limit":"","url":"submission_url-07ac898a-97a3-4aa8-be37-3c48845bc25a","user_id":2044723,"user_id__email":"","version":0},"success":true}
