Jump to content

User:YJJcoolcool/sandbox

From Wikipedia, the free encyclopedia

This is the current revision of this page, as edited by YJJcoolcool (talk | contribs) at 12:18, 14 December 2019 (Task 5). The present address (URL) is a permanent link to this version.

(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

This is my user sandbox.

Task 1

[edit]

Bird Woman Falls 2017.jpg

imgs

Task 2

[edit]

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

[edit]

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:

[edit]

0 degrees Celsius is equal to 32 degrees Fahrenheit. It is cold.

Testing the warm/cold function:

[edit]

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

[edit]

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

[edit]

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

[edit]

Hello Agnetha
Hello Betty
Hello Carlos
Hello Davinder
Hello Eloise
Hello Mike
Hello John
Hello Kevin

Task 5

[edit]

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.

Year = 2018
Day = 31
Month = October

Pattern: "(&w+) (&d+), (&d+)"

Here is the edited pattern, with dmydate passed as October 31, 2018:

Year = 2018
Day = 31
Month = October