Final Summary
Part of the Fundamentals section of Coddy's Lua journey — lesson 39 of 90.
Challenge
EasyComplete your character status display project by creating a comprehensive summary line that combines all character information into a single, formatted sentence. Use string concatenation to combine the character's name, level, and hp variables into one descriptive line that follows this exact format: "Coddy (Lvl 5) has 100 HP."
This final summary should appear after all the individual stat lines, providing a complete overview of the character in a single, easy-to-read sentence.
Try it yourself
-- Character variables
name = "Coddy"
level = 5
hp = 100
status = true
-- Display character status
print("=== Character Status Display ===")
print("Name: " .. name)
print("Level: " .. level)
print("HP: " .. hp)
print("Status: " .. tostring(status))
-- TODO: Print a summary line using string concatenation
-- e.g. Coddy (Lvl 5) has 100 HP.All lessons in Fundamentals
4Operators 2 Relational & Logic
Equality OperatorsRelational OperatorsThe 'and' OperatorThe 'or' OperatorThe 'not' OperatorShort-Circuit EvaluationTruthy and Falsy ValuesRecap - Simple Logic7Basic Conditional Logic
The if-then StatementThe if-then-else StatementThe elseif StatementRecap - Treasure Chest2Variables and Data Types
What is a Variable?NumbersStringsBooleansThe Value 'nil'The type() FunctionNaming ConventionsRecap - Character Profile5Basic Output
Printing LiteralsPrinting VariablesPrinting Multiple ValuesCombining Strings & VariablesThe tostring() FunctionInputCastRecap - Status ReportRecap - Till 1208String Manipulation Basics
string.len()string.upper & string.lowerstring.sub()string.rep()string.find()Recap - Format Username3Operators 1 Arithmetic & Conc
Arithmetic OperatorsModulo OperatorExponentiation OperatorString ConcatenationOperator PrecedenceRecap - Simple Calculations6Project: Character Stats Disp
Welcome MessageDeclare Character Stats9Functions Basics
Declaring a FunctionCalling a FunctionFunctions with ParametersFunctions with Multiple ParamsThe 'return' StatementRecap - Area Calculator