Docsity

Programming Basics: Crash Course Computer Science #12, Exercises of Programming Languages

Partial preview of the text

Download Programming Basics: Crash Course Computer Science #12 and more Exercises Programming Languages in PDF only on Docsity!

Introduction to Computer Science Homework Packet March 30th^ – April 3rd Students, please complete this packet on days that we would normally have class (Tuesday and Friday). Although school has been cancelled, I want to ensure that you are still getting the necessary work to keep your minds fresh and ready for when we return back to school. Day # Quick Start: Please answer the following and explain your reasoning. “In the near future will mobile devices serve as our digital ID to access enterprise services and data?” Activity: Complete Worksheet # “Programming Basics: Crash Course Computer Science #12” Directions: Watch the video (link is on the handout) and answer the questions Day # Quick Start: Please answer the following and explain your reasoning. “What will be the next electronic revolution?” Activity: Complete Worksheet # “Intro to Algorithms: Crash Course Computer Science #13” Directions: Watch the video (link is on the handout) and answer the questions

Programming Basics: Crash Course Computer Science

Available at https://youtu.be/l26oaHV7D40 or just youtube/google “Crash Course Computer Science 12”

  1. Just like spoken languages, programming languages have ______________________. The set of rules that govern the structure and composition of statements in a language is called ________________.
  2. To “ initialize ” our variables means to _______________ ___________________________.
  3. An IF statement is like a fork in the road—which path you take is conditional on whether the expression is ___________ or _____________—so these expressions are called ______________________________________. a. What’s one example of an if-then-else statement from one of the popular programming languages mentioned? Indicate the language and the statement.
  4. To repeat some statements many times, we need to create a conditional ____________. One way is a _____________ statement, also called a _________________________. a. Instead of being a condition-controlled loop that can repeat forever until the condition is false, a ________________________ is count-controlled; it repeats a specific number of times.
  5. To compartmentalize and hide complexity, programming languages can package pieces of code into named functions , also called ________________ or ___________________ in different programming languages. a. We need to send the result of our exponent code back to the part of the program that requested it; for this, we use a _________________ statement, and specify the value in ‘result’ be returned. b. Modularizing programs into functions not only allows a single programmer to _____________ _____________________________________, but also allows teams of people to work _________________ on even bigger programs. c. Modern programming languages come with huge bundles of pre-written functions, called _____________________.