
OO e Kotlin
Authored by Robison Brito
Computers
University
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword do you use to define a function in Kotlin?
fun
func
function
main
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following do you need to create a Kotlin program that prints a line of text?
comment describing what your program does
a main() function
curly braces {} around the instructions to the system
a call to print() or println()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What do you expect this Kotlin code to do?
Print one line of text
Print two lines of text
Print three lines of text
Print two lines of text separated by a blank line
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you modify this main() function so that it prints a 6-layer cake for someone's 4th birthday?
Set val age to 6, set val layers to 4
Set val age to "4", set val layers to "6"
Set val age to 4, set val layers to 6
Leave the code as-is
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these options correctly calls the function, below, and passes it valid input arguments?
createMessage("Amy", "Australia", 20)
createMessage("Evan", England, 9)
createmessage("Tom", "Thailand", “40”)
createMessage(Heather, “Haiti”, 7)
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is a difference between a class and an instance?
You can think of a class as a blueprint and an instance as the actual “thing".
A class is like architectural plans for a bridge, and the Golden Gate bridge an instance of those plans.
A class is for defining categories of "things", while instances are for defining their properties.
You can create multiple instances from a class, but you can't create classes from instances.
7.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which of the following is NOT a way for creating a comment in Kotlin?
Add // at the beginning of or inside a line and anything after that // is considered a comment.
Put /* or /** to start a block comment, and end it with */.
Use // to turn the rest of a function into a comment.
Use /* to start a comment that is one line long.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
8 questions
Cha-ching 2
Quiz
•
1st Grade - University
10 questions
Teste python- Unesp-Jaboticabal
Quiz
•
University
12 questions
Đề Kiểm Tra Tin Học Lớp 4
Quiz
•
5th Grade - University
10 questions
Excel 2016 Formato de celda
Quiz
•
University
10 questions
Server Administration- Quiz 1
Quiz
•
12th Grade - University
11 questions
Computer Science (1-9) - Identifying & Preventing Threats
Quiz
•
University
10 questions
Quiz Informatica Jornadas Orientación Asunción
Quiz
•
12th Grade - University
15 questions
Revisão - Arquitetura de Computadores
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade