S_Playground_J_W4

S_Playground_J_W4

5th - 7th Grade

5 Qs

quiz-placeholder

Similar activities

Conflict on the Plains

Conflict on the Plains

5th Grade

10 Qs

WWI

WWI

6th - 12th Grade

10 Qs

9/27 _Do Now:

9/27 _Do Now:

7th Grade

10 Qs

medieval western Europe

medieval western Europe

7th Grade

10 Qs

Meso America and Exploration Pre Assessment

Meso America and Exploration Pre Assessment

6th - 11th Grade

10 Qs

Chocolate By Hershey chapters 5-7

Chocolate By Hershey chapters 5-7

3rd - 5th Grade

10 Qs

SOCIAL HISTORY

SOCIAL HISTORY

7th Grade

10 Qs

TX - Unit 4 Review [thru CW causes]

TX - Unit 4 Review [thru CW causes]

7th Grade

10 Qs

S_Playground_J_W4

S_Playground_J_W4

Assessment

Quiz

History

5th - 7th Grade

Practice Problem

Hard

Created by

Ryan Chung

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

使用類別Player來建立一個玩家player,下列哪一個語法正確?

let player = Player()

let Player = player()

Player.player()

player.Player()

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

在Swift語言中,函數的關鍵字是?

func

function

method

han_number

3.

FILL IN THE BLANK QUESTION

1 min • 5 pts

func accumulate(count:Int) -> Int{

var totalCount = 0;

for i in 1...count {

totalCount = totalCount + i;

}

return totalCount

}

print(accumulate(count: 5))

請問輸出結果為?

4.

FILL IN THE BLANK QUESTION

1 min • 5 pts

func multiplyAndPlus(a:Int, b:Int) -> Int {

return a*b + 2

}

print(multiplyAndPlus(a:2, b:6))

請問輸出結果為?

5.

FILL IN THE BLANK QUESTION

1 min • 5 pts

var result = 0

for i in 0...5 {

if !(i == 2){

result = result + i

}else {

result = result + 4

}

}

print(result)

請問輸出值為?