Search Header Logo

LUA QUIZ

Authored by JKL 1234s

Computers

9th - 12th Grade

Used 1+ times

LUA QUIZ
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

declare variable x as 10 in lua?

local x = 10

!!!

x := 10
let x = 10
var x = 10

2.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

how to declare a string variable in lua?

local str = 'Hello'

!!!

str := 'Hello'

let str = 'Hello'

var str = 'Hello'

3.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

what is the correct way to create a table in lua?

local myTable = {}

!!!

myTable := {}

let myTable = {}

var myTable = {}

4.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

how to define a function in lua?

function myFunction() end

!!!

myFunction() := function() end

let myFunction = function() end

var myFunction = function() end

5.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

how to concatenate two strings in lua?

local result = str1 .. str2

!!!

result := str1 + str2

let result = str1 + str2

var result = str1 + str2

6.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

how to create a for loop in lua?

for i = 1, 10 do end

!!!

for i in 1 to 10 do end

let i = 1; i <= 10; i++

var i = 1; i < 10; i++

7.

MULTIPLE CHOICE QUESTION

30 sec • 20 pts

what is the correct way to check if a table is empty in lua?

if next(myTable) == nil then end

!!!

if myTable == {} then end

if #myTable == 0 then end

if myTable.length == 0 then end

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?