Code Academy Quizzing

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Q: You have 5 forks and 3 spoons. Fill in the blank to create the correct comparison expression. forks ____ spoons

A: >

Q: You have eight plants: plants = 8/Does this statement evaluate too true or false: plants == 4?

A: False

Q: When we use a value without assigning it to a variable that's known as:

A: Hardcoding

Q: The purpose of a variable is to

A: Store a value

Q: True or False: is this value a string? my_favorite_show = '24'

A: True, Because the number is wrapped in single-quotes (''), it means that the response is a string, even if it contains a number.

Q: Data types are important because: a. They identify different information used in programs b. They are a recent development in programming c. They increase the number of lines in a program

A: a.

Q: Logical operators and comparison operators evaluate to which data type? a. boolean b. string c. number

A: a.

Q: When a function is called... a. all of its steps are executed b. it is defined c. it picks up the phone d. it lists all of its steps

A: a.

Q: When a function's name inputs and instructions are specified we can say that the function is... a. defined b. executed c. called

A: a.

Q: Fill in the Blank: When we define a function its inputs are called ___. Each time we call the function we'll give actual values for each input called ____ a. arguments...parameters b. parameters...arguments

A: b.

Q: What are some benefits of using functions in a program? a. Less lines of code b. Reusability-flexibility-organization c. Brittleness and disorganization

A: b.

Q: What data type is used in this code block? isTouching = true

A: boolean

Q: Primitive data types include: a. numbers-booleans-variables b. strings-dictionaries-integers c. strings-numbers-booleans d. variables-arrays-lists

A: c

Q: String are called strings because: a.Strings represent different musical intervals b.Strings form the parameters of our program c.Strings are a sequence of symbols so we can think of each character being strong together d.Strings connect two pieces of code

A: c.

Q: Which one of the following statements is true about functions? a. When an instruction step is executed all functions that share that step are also executed b. Functions cannot be defined c. Functions are reusable sets of statements grouped to perform a task

A: c.

Q: Arithmetic operators are used to: a. Determine if something is true b. Compare different amounts c. Store a value d. Make mathematical calculations

A: d.

Q: What is an operator? a. A numerical data type b. A programming language c. A statement that evaluates to true d. A symbol that performs calculations like addition

A: d.

Q: Given the value of myCookbook what do you think the value of statement will be? myCookbook = 'The Joy of Cooking' yourCookbook = 'How to Cook Everything' statement = 'My favorite cookbook is ' + myCookbook

A: 'My favorite cookbook is The Joy of Cooking'

Q: Take a look at the following code snippet. If we print out the final value of numSides what would it be? numSides numSides = 4 triangle = 3 numSides = triangle

A: 3

Q: You're taking the inventory at a clothing store. You have six shifts. Save the value of the number of shirts to the variable shirts. shoes = 8 dresses = 4 shirts ___ ____

A: = 6


Ensembles d'études connexes

Chapter 1: Composition of the Atmosphere

View Set

exam 2 financial accounting (accounts)

View Set

Econ 201 Final CH 18, 19, 20, 1, 2

View Set

Unit 11 Wellness and Nutrition PRACTICE

View Set

MICRO - LEC EXAM 1 - 8/30/18 lecture

View Set

CompTIA Network+ N10-008 Exam Wireless Networking Quiz

View Set

Market-Based Management Chapter 11: Portfolio Analysis and Strategic Market Planning

View Set

Ch. 11 Review: Autonomic and Motor Systems

View Set