User:YJJcoolcool/sandbox: Difference between revisions
YJJcoolcool (talk | contribs) Tags: Mobile edit Mobile web edit |
YJJcoolcool (talk | contribs) Tags: Mobile edit Mobile web edit |
||
Line 67: | Line 67: | ||
A2. All digits, with 1 or more repetitions of characters in the class. |
A2. All digits, with 1 or more repetitions of characters in the class. |
||
{{#invoke:Sandbox/YJJcoolcool|unpack|dmydate=October 31 |
{{#invoke:Sandbox/YJJcoolcool|unpack|dmydate=October 31,2018}} |
||
Pattern: "(&w+) (&d+) (&d+)" |
Pattern: "(&w+) (&d+) (&d+)" |
Revision as of 11:40, 14 December 2019
This is my user sandbox.
Task 1
Great Blue Heron and immature Bald Eagle on the Platte River.jpg
![](http://upload.wikimedia.org/wikipedia/commons/thumb/1/12/Great_Blue_Heron_and_immature_Bald_Eagle_on_the_Platte_River.jpg/220px-Great_Blue_Heron_and_immature_Bald_Eagle_on_the_Platte_River.jpg)
imgs
Task 2
Q1. What keyword marks the start of a function definition? A1. function
Q2. Which letter is conventionally used in Scribunto modules to hold the table of functions? A2. p
Q3. What keyword marks the end of a function definition? A3. end
Hello, world!
Hello from Lua to my friend Ada.
Hello from Lua to my friend YJJ.
Hello from Lua to my friend Jimmy.
Task 3
5 degrees Celsius is equal to 41 degrees Fahrenheit. It is cold.
25 degrees Celsius is equal to 77 degrees Fahrenheit. It is warm.
Testing the no celsius parameter given function:
0 degrees Celsius is equal to 32 degrees Fahrenheit. It is cold.
Testing the warm/cold function:
12 degrees Celsius is equal to 53.6 degrees Fahrenheit. It is warm.
5 degrees Celsius is equal to 41 degrees Fahrenheit. It is cold.
9 degrees Celsius is equal to 48.2 degrees Fahrenheit. It is cold.
Task 4
4 Times table
4 times 1 equals 4
4 times 2 equals 8
4 times 3 equals 12
4 times 4 equals 16
4 times 5 equals 20
4 times 6 equals 24
4 times 7 equals 28
4 times 8 equals 32
4 times 9 equals 36
4 times 10 equals 40
4 times 11 equals 44
4 times 12 equals 48
Test Cases for different errors
2 Times table
2 times 1 equals 2
2 times 2 equals 4
2 times 3 equals 6
2 times 4 equals 8
2 times 5 equals 10
2 times 6 equals 12
2 times 7 equals 14
2 times 8 equals 16
2 times 9 equals 18
2 times 10 equals 20
2 times 11 equals 22
2 times 12 equals 24
2 Times table
2 times 1 equals 2
2 times 2 equals 4
2 times 3 equals 6
2 times 4 equals 8
2 times 5 equals 10
2 times 6 equals 12
2 times 7 equals 14
2 times 8 equals 16
2 times 9 equals 18
2 times 10 equals 20
2 times 11 equals 22
2 times 12 equals 24
2 Times table
2 times 1 equals 2
2 times 2 equals 4
2 times 3 equals 6
2 times 4 equals 8
2 times 5 equals 10
2 times 6 equals 12
2 times 7 equals 14
2 times 8 equals 16
2 times 9 equals 18
2 times 10 equals 20
2 times 11 equals 22
2 times 12 equals 24
-4 Times table
-4 times 1 equals -4
-4 times 2 equals -8
-4 times 3 equals -12
-4 times 4 equals -16
-4 times 5 equals -20
-4 times 6 equals -24
-4 times 7 equals -28
-4 times 8 equals -32
-4 times 9 equals -36
-4 times 10 equals -40
-4 times 11 equals -44
-4 times 12 equals -48
Tables
Hello Agnetha
Hello Betty
Hello Carlos
Hello Davinder
Hello Eloise
Hello Mike
Hello John
Hello Kevin
Task 5
This is simple
Q1. What does %w+ match in a Lua pattern? A1. All ASCII alphanumeric characters, with 1 or more repetitions of characters in the class.
Q2. What does %d+ match in a Lua pattern? A2. All digits, with 1 or more repetitions of characters in the class.
Lua error in Module:Sandbox/YJJcoolcool at line 57: attempt to concatenate local 'm' (a nil value).
Pattern: "(&w+) (&d+) (&d+)"