














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















What do we mean by "programmers are inventors"? - Answer: Programmers create programs that solve problems, sometimes from scratch, sometimes from existing code. Their creations help power every industry in the world. What do we mean by "programmers are fluent"? - Answer: There are thousands of programming languages, each with a different set of rules and meant for a different purpose. A programmer may specialize in one language, but it's likely that he or she is fluent in a few. What do we mean by "programmers are visionaries"? - Answer: They just don't write one program and move on. A programmer's vision for a program includes bringing it to life and finding ways to expand and evolve it to new, better programs. What do we mean by "programmers are gatekeepers"? - Answer: Writing and owning a program involves testing, debugging, and resolving any issues to make sure the program is working for the user. What do we mean by "programmers are researchers"? - Answer: Code libraries, programming threads, and collections of best practices are resources that programmers constantly seek out to improve their skills and share ideas. Computer programmers write code that translates commands to.... - Answer: binary code so computers can understand them. What is the connection between programming and healthcare? - Answer: Patient portals, robotic surgery, even 3-D printed prosthetics would not have been possible without programmers. What is the connection between programming and education? - Answer: The education industry depends on software to help students stay at the front of today's technology.
What is the connection between programming and military? - Answer: They rely on programmers to develop drones, maintain operational security and develop cutting-edge technology. What is the connection between programming and tech? - Answer: The tech world is made up of programmers who make tomorrow's technology possible! They build social media sites, talking smart cars, etc. What is the connection between programming and entertainment? - Answer: Films, video games, concerts, and more all use programmers to create the effects we enjoy. What is the connection between programming and agriculture? - Answer: Software created by programmers helps us track and plan growth so we can have the healthy food we need. Which statement uses a Boolean condition to test: "If kids are under 10, they eat for free"?
Con of high-level programming languages? - Answer: When run, programs tend to be slower than ones written with low-level languages. Con of low-level programming languages? - Answer: Written in machine code, which is challenging for humans to understand. Limit of high-level programming language? - Answer: Must be translated into machine code (this is done by interpreting and compiling). Limit of low-level programming language? - Answer: Programs are written for specific computers and will only work on that one type of computer. What can interpreters and compilers both do? - Answer: They can translate a high-level language for a computer to understand. Interpreters and compilers have similar... - Answer: functions but are still a little different. Interpreter - Answer: Translates one line of code and then executes it before moving to the next line. Compiler - Answer: Translates all lines of code together and then executes them at once. What is the IDLE? - Answer: An integrated development environment for Python. When was Python created? - Answer: 1991 Which programming language is a popular one to learn first? - Answer: Python. What is a string? - Answer: A sequence of letters, numbers, spaces, and symbols or alphanumeric information. It can be a single letter, a word, or even a phrase. It is not meant to perform math operations.
Examples of strings? - Answer: Hello, world!.......800-374-1430.........Please enter your first name:.........Your address How much memory space does a string take up? - Answer: It depends on the length of the string. The longer the string, the more memory it takes up. How much memory space does a floating point take up? - Answer: Because floats have decimals, they're more precise. That means they end up taking up a lot of memory. How much memory space does a integer take up? - Answer: As relatively simple numbers, integers don't take up that much room. What kind of data type is a phone number? - Answer: String because you don't use the value to perform math. Examples of integers? - Answer: Total books in the Harry Potter series......6.......Steps I walked today.......Points our basketball team scored Examples of floating point numbers? - Answer: Result on a stopwatch.....The cost of an ice cream cone......8.342.......Number of liters in a gallon What can you do to fix Python assuming all values you enter using the input() function are strings? - Answer: Use the int() or float() functions in your code to indicate your number type. What does "print" mean in programming? - Answer: To display something on the screen. How do you make Python print your strings exactly as written? - Answer: Put them in quotation marks. What do programmers refer to their errors as and why? - Answer: Bugs because the process of removing the bug is called debugging.
Why should you check spacing if you are stuck in finding errors in your code? - Answer: Python expects blocks of code to be spaced properly. Look out for indentations. What is the PMR(Post Mortem Review)? - Answer: A short, written statement that evaluates how the project went, reflecting on what went well and how the program could be improved. What does the Post Mortem Review allow programmers to do? - Answer: Programmers are able to share lessons learned, reflect, and complete future projects efficiently. Turtle Graphics - Answer: A set of functions in Python that allow the programmer to draw on the screen or create images. What are programmers able to do using built-in functions from modules? - Answer: They are able to import pre-written code and make use of it when writing their own programs. This leads to fast and efficient work. Positive and negative values can be used when commanding the turtle. - Answer: True. What does Python's Turtle Graphics Module give you control of? - Answer: An imaginary "turtle" who will follow your instructions, drawing lines as he moves around the screen. In order to make an object draw a line on the screen, __________ such as forward(), left(), right(), and backward() are used. - Answer: functions What do left and right functions do to the turtle? - Answer: It tells it how many degrees to turn. What do forward and backward functions do to the turtle? - Answer: It tells it how many pixels to move. Software Development Life Cycle - Answer: The fully planned out life of a project, from early ideas and planning, to execution and delivery, through steps.
Planning & Analysis - Answer: This first step is where you define your project goal, create a requirements document, and analyze the scope of work. Design - Answer: Next, design your program by writing pseudocode and mocking up how the software will work, and what it will look like. Coding - Answer: This is where you write the actual code needed. Testing - Answer: This step includes identifying defects and debugging to make sure your software is running in tip top shape. Maintenance - Answer: This primarily involves updating and making improvements based on user feedback, as well as resolving any defects that arise. What are the two of the most common methods software development life cycles use? - Answer: Waterfall and Agile. Programming Task Details WATERFALL - Answer: Project teams work on one step at a time. Teams do not move to the next step until the previous step is completed and approved. Extensive documentation allowing teams to keep control over what version of the project they are working on and what changes are needed. Programming Task Details AGILE - Answer: Project teams do smaller portions of the entire project in small sprints. Teams can interact to handle different steps simultaneously if needed. Documentation is still required allowing teams to keep control over what version of the project they are working on and how the project has changed along the way. Benefits WATERFALL - Answer: The process is clear from beginning to end. Benefits AGILE - Answer: As an approach to rapid development, the focus is on development rather than planning, enabling teams to start work more quickly.
for n in range(9, 20, 3): - Answer: When the loop begins, the counter variable n is assigned the start value of 9. After each iteration of the loop, the value of n increments by 3, which is the change value. The loop repeats if the value of the counting variable n is less than 20, the end value. Therefore in the loop, n will have the values of 9, 12, 15, and 18. BASICALLY, 9 is the number that counting begins on, 20 IS THE NUMBER BEFORE IT STOP SO 19 IS THE LAST NUMBER, 3 IS THE NUMBER IT INCREASES BY. What is a for loop example? - Answer: for x in range(0, 1, 10): What is a while loop example? - Answer: x = 0 while(x < 10): x = x + 1 Attributes of a for loop? - Answer: Repeats for a set range of values and the loop variable is given a start value. Attributes of while loop? - Answer: Repeats while a boolean condition is true and the loop variable is assigned a value before the loop. Attributes of while loops and for loops? - Answer: They both will repeat a block of code and will stop once the condition is false. What is an example in real life that works like a while loop? - Answer: WHILE IT'S RAINING OUTSIDE...you use an umbrella. On the condition that it is raining, you will use an umbrella. Otherwise, you'll stop. What are the two main things a while loop needs to know to do? - Answer: What action to do and the conditions for doing that action. Less than or equal to and Greater than or equal to - Answer: <= and >= Equal to - Answer: ==
Not equal to - Answer: != Less than and Greater than - Answer: < and > What does Python use to determine whether the condition is true or false? - Answer: Boolean logic. When will the loop repeat its action? - Answer: As long as the condition provided is true. What happens when the condition becomes false? - Answer: The loop will end. Relational Operator - Answer: Operators used to compare two values, variables, or expressions. Boolean - Answer: A condition that evaluates whether something is true or false. The code in the body of the loop does not get indented. True or False? - Answer: False. When writing a while loop the statement should begin with the keyword "while". True or False? - Answer: True. Where does the test condition go? - Answer: Inside the parentheses. When are while loops best used? - Answer: best used when you don't know the exact number of repetitions needed When are for loops best used? - Answer: When you know the exact number of repetitions needed. Relational operators compare values and determine whether a condition of an if statement is true or false. - Answer: True.
How does memory play a role with int and float? - Answer: You may be working with a program that tends to take up a lot of storage space on your computer. Floating point numbers take more space than integers. Example: If you can use 1 instead of 1.0, you can save yourself some memory. How does precision play a role with int and float? - Answer: You may need to have a specific number that requires decimals. Floating point numbers allow for more precision than integers. How does arithmetic play a role with int and float? - Answer: You may need to have the correct math. The results of integer math and floating point math aren't always the same. Example: 11/5=? Python will tell you the answer to this question is 2. If you change the numbers to decimals, you'll get a different answer: 11.0/5.0 = 2.2. We have to tell Python whether the values we assign to variables are numeric or alphanumeric. - Answer: False, Python can tell on its own. The equal sign in Python is for assigning a value to a variable, not for math. - Answer: True. Python doesn't follow order of operations. - Answer: False. Arithmetic performed with floating point numbers will have a result with at least one decimal place, even if it's just .0. - Answer: True. When you mix integer and float values in your arithmetic, what will the result be? - Answer: It will be a floating point number for a precise answer. What can parentheses do for your code? - Answer: They help you control the order for the final computation. Python won't let you concatenate string literals and numeric variables. - Answer: True. How can we concatenate a string literal and a numeric value? - Answer: Using the str() function.
Why would a programmer use the logical operator "and" in an if statement?
How do procedural and object-oriented programming approaches differ? - Answer: Procedural programming breaks down the functions needed for a program step-by-step, while object-oriented programming creates classes with attributes and features. What is one benefit of using object-oriented programming? - Answer: Reusable code. Decimal numbers are based on 10 digits from __________. - Answer: 0- In Python, output starting with 0x indicates a hexadecimal number. - Answer: True. Which of the following represents the numeric value nine as a decimal number?
Once programmers write a useful class for one programming project, they can often reuse that class in another program instead of starting from scratch. How would you classify the characteristic?