Search Header Logo

Swift: Funciones, arrays y variables

Authored by DANIELA ATAYDE REGALADO

Instructional Technology

University

Used 3+ times

Swift: Funciones, arrays y variables
AI

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

10 sec • 1 pt

¿Cuál es la forma correcta de declarar una constante en Swift?

let x = 10

const x = 10

var x = 10

constant x = 10

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • ¿Qué tipo de colección es un array en Swift?

  • a) Mutable y ordenada

  • b) Inmutable y desordenada

  • c) Mutable y desordenada

  • d) Inmutable y ordenada

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  • Cuál es la forma correcta de definir una función en Swift?

def miFuncion() {}

  • function miFuncion() {}

  • func miFuncion() {}

  • miFuncion() {}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué método se utiliza para agregar un elemento a un array en Swift? a) add()

add()

insert()

append()

push()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Cuál es el resultado de la siguiente expresión?

let a = 5

let b = 10

let resultado = a + b

5

10

15

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué tipo de dato se utiliza para almacenar un valor verdadero o falso en Swift?

String

Int

Char

Bool

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

¿Qué función se utiliza para recorrer un array en Swift?

map()

forEach()

filter()

repeat()

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?