Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Welcome Message
- print("\nWelcome to Variable Lesson\n==========================================")
- -- Variable Definition
- local a,b,c
- -- Initialization
- a = 5
- b = 10
- c = 15
- -- Print Message
- print("This is value of a:", a) -- Print Message for Variable of A
- print("This is value of b:", b) -- Print Message for Variable of B
- print("This is value of c:", c) -- Print Message for Variable of C
- -- Just something like new line
- print("==========================================")
- -- Swapping between Variables
- b, c = a, b
- print("This is variable b but with a value:", b) -- Variable b Swapped the value with a
- print("This is variable c but with b value:", c) -- Variable c Swapped the value with b
- -- Just something like new line
- print("==========================================")
- -- Float Value Variable
- f1 = 50.0 -- Float Value 1
- f2 = 40.0 -- Float Value 2
- f3 = 3.0 -- Float Value 3 , Used for Math operation down
- print("This is the value of First Float:", f1)
- print("This is the value of Second Float:", f2)
- print("This is the value of Third Float:", f3)
- -- Just something like new line
- print("==========================================")
- -- Simple math with Float values
- print("First Float value divided by Third Float", f1/f3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement