Week 2 Review Answers

What are programming elements?

Programming elements are "pieces" of the program, like breaking down a project, a program should be broken down into its most basic elements. There maybe a password verification element, an element which gets the user's input. Basically its pieces!

What is the difference between an expression and a statement?

An expression has a value, hence 4 + 5 is an expression, it has a value of 9.
A statement carries out an action, hence X = 4 + 5 is a statement because X is being assigned a value of 9.

Please tell me, in your own words, what a statement does.

Statements carry out actions, be it to assign a variable, perform a loop or print some text. Action means statement.

Give an example of a complete statement using only operators, variables and values (an expression statement).

name_of_course = "Introduction " + "to " + "Programming " + "Concepts"; //the value of name_of_course is Introduction to Programming Concepts