Swift Quiz Level 1
Quiz-summary
0 of 12 questions completed
Questions:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
Information
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Testing Swift coding skills level Beginner 1
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
Results
0 of 12 questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 points, (0)
Average score |
|
Your score |
|
Categories
-
Not categorized
0%
-
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Pos. | Name | Entered on | Points | Result |
---|---|---|---|---|
Table is loading | ||||
No data available | ||||
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
-
Answered -
Review
-
Question 1 of 12
1. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Declaring a constant is Swift would be …
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 2 of 12
2. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Swift is a programming language used for …
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 3 of 12
3. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Declaring a variable is Swift would be …
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 4 of 12
4. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
When declaring a constant this way:
let pi = 3 + 0.14159
we end up with what type of a constant ?
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 5 of 12
5. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
If we want to display a system message “touch detected” within Swift at a specific point
of our application we can do that by using…
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 6 of 12
6. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
If we have a variable declared as:
var customerName = “John Smith”
, how can we dynamically print the contents of that var in a system message within xCode ?
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 7 of 12
7. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Which of these is a valid use of comments within Swift ?
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 8 of 12
8. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Is the following operation correct ?
let number1 = 3
let number2 = 0.14159
let newNumber = number1 + number2
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Good job !
let number1 = 3 // this creates an Int
let number2 = 0.14159 // this creates a Double
Correct way would be to convert the Int to Double.
let newNumber = Double(number1) + number2
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
let number1 = 3 // this creates an Int
let number2 = 0.14159 // this creates a Double
Correct way would be to convert the Int to Double.
let newNumber = Double(number1) + number2
-
Question 9 of 12
9. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
The following statement:
if myVar { println(“no error”) } else { println(“error”) }
will not compile an error if myVar is declared which way ?
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 10 of 12
10. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
Optional variables are declared like:
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
-
Question 11 of 12
11. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
What is the meaning of the following ‘if’ statement:
if myVar != nil {
println("myVar is awesome !")
}
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
-
Question 12 of 12
12. Question1 points
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
String Mutability
If we have :
var myString = ” and Oranges”
myString += “Apples”
Then what is the value of ‘myString’ ?
CorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
A += B
is the same as
A = A + B
IncorrectNotice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 714
Notice: Trying to get property ‘comment_ID’ of non-object in /var/www/wp-content/plugins/urvanov-syntax-highlighter/class-urvanov-syntax-highlighter-plugin.php on line 724
A += B
is the same as
A = A + B
-
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/wp-content/plugins/wp-pro-quiz/lib/helper/WpProQuiz_Helper_Until.php on line 122
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/wp-content/plugins/wp-pro-quiz/lib/helper/WpProQuiz_Helper_Until.php on line 127