Jump to content

User:JaimePRE/sandbox

From Wikipedia, the free encyclopedia

This is JaimePRE's user sandbox.

Task 1

[edit]

Horses and thunderstorm1.jpg

File:Horses and thunderstorm1.jpg

The list is called imgs

Task 2

[edit]

Q1. Which letter is conventionally used in Scribunto modules to hold the table of functions? A1. p

Q2. What keyword marks the start of a function definition? A2. function

Q3. What keyword marks the end of a function definition? A3. end

Hello, world!

Hello from Lua to my friend Andy.
Hello from Lua to my friend Jaime.
Hello from Lua to my friend Jimbo.

Task 3

[edit]

5 degrees Celsius is 41 degrees Fahrenheit. It is cold.

25 degrees Celsius is 77 degrees Fahrenheit. It is warm.

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

9 degrees Celsius is 48.2 degrees Fahrenheit. It is cold.

|celsius=

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

|celsius=hello

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

Apparently if I write the code such that cel = tonumber(frame.args.celsius) or 0 it immediately assigns 0 as cel? Interesting

Task 4

[edit]

6 Times table
6 times 1 equals 6
6 times 2 equals 12
6 times 3 equals 18
6 times 4 equals 24
6 times 5 equals 30
6 times 6 equals 36
6 times 7 equals 42
6 times 8 equals 48
6 times 9 equals 54
6 times 10 equals 60
6 times 11 equals 66
6 times 12 equals 72

nothing

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

blank

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

text

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

-6 Times table
-6 times 1 equals -6
-6 times 2 equals -12
-6 times 3 equals -18
-6 times 4 equals -24
-6 times 5 equals -30
-6 times 6 equals -36
-6 times 7 equals -42
-6 times 8 equals -48
-6 times 9 equals -54
-6 times 10 equals -60
-6 times 11 equals -66
-6 times 12 equals -72

Tables

[edit]

Hello Dad
Hello Mum
Hello Uncle Stan
Hello Aunty Elsie
Hello Brian
Hello 爷爷
Hello ユ子ばあちゃん
Hello Cousin Stanley

Task 5

[edit]

This is easy.

Q1. What does %d+ match in a Lua pattern? A1. The longest possible sequence of digits

Q2. What does %w+ match in a Lua pattern? A2. The longest possible sequence of ASCII alphanumerical characters

Year = 2018
Day = 31
Month = October

"(%w+) (%d+), (%d+)"

Year = 2018
Day = 31
Month = October