Variables Problems

Lua Variables Problems

Problem 1

print("Problem 1")
Create variables for name, street address, city, state and zip code.
Print your name and mailing address as it would appear on the outside of an envelope.

Problem 2

print("Problem 2")
In this problem, you're going to write a paragraph about yourself.
Create the following variables and assign each to a sentence about yourself.
  • sentence1
  • sentence2
  • sentence3
  • sentence4
  • sentence5
Print the paragraph.

Problem 3

print("Problem 3")
The 8 parts of speech are a noun, verb, adjective, pronoun, preposition, conjunction and interjection.
part of speech
a word (other than a pronoun) used to identify any of a class of people, places, or things ( common noun ), or to name a particular one of these ( proper noun ).
a word used to describe an action, state, or occurrence, and forming the main part of the predicate of a sentence, such as hear, become, happen.
a word or phrase naming an attribute, added to or grammatically related to a noun to modify or describe it.
a word or phrase that modifies or qualifies an adjective, verb, or other adverb or a word group, expressing a relation of place, time, circumstance, manner, cause, degree, etc. (e.g., gently, quite, then, there ).
a word governing, and usually preceding, a noun or pronoun and expressing a relation to another word or element in the clause, as in “the man on the platform", "she arrived after dinner", "what did you do it for?"
a word used to connect clauses or sentences or to coordinate words in the same clause (e.g. and, but, if).
an exclamation, (e.g. ah!, dear me! ).
Create the following variables for each part of speech and assign appropriate values.
  • noun
  • verb
  • adjective
  • adverb
  • preposition
  • conjunction
  • interjection
Print the variables.

Problem 4

print("Problem 4")
Create at least 5 variables the describe yourself. Print the variables.

Problem 5

print("Problem 5")
Assign new values to the variables you created in Problem 4 about one of your friends. Print the variables.
Last modified 1yr ago