stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Practice Computational Thinking Flashcards | StudBud
Explore
/
Practice Computational Thinking
Practice Computational Thinking
20 terms
·
StudBud Administration
·
231 plays
Basic swift concepts Variable and Constants Strings #computational #thinking #swift #programming
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
What is the result of the expression "1" + "1"
2
"11"
"2"
"1 1"
2
What is true about swift?
is a programming language designed by apple
is a hardware
is a software
is a language that has its own grammar or SYNTAX
3
which of these are strings?
Neither
"\"Curiouser and curiouser,\" said Alice."
let myLuckyNumber = 42
Both A and B
4
What is true about variables and constants?
Essentially, they're the same
A variable's value can be changed at any time
var defines a variable and let defines a constant
A constant's value is permanent
5
What is a character in programming?
A letter from A to Z
The first 140 ASCCI Symbols
A distinguished coder like Mark Zuckerberg
A piece of string like a letter, punctuation mark, or number
6
Which line is declaring a constant?
let "Johnny" = name
let name = "Jhonny"
var name = "Johnny"
name = "Johnny"
7
What's up with variables?
Variables can change their type at any time.
Variables are containers for values
Variables help us store information for later
Variables can remember many values at once
8
¿Which of these are strings?
Both A and B
"100%"
Neither
"$4.55"
9
What is the escape character for?
Treating the next character in a special way
Telling the computer to quit an app
Undoing the last program command
Skipping the rest of the string
10
What is true about code?
Code is another word for a list of instructions
Code defines the actions to be performed by the computer
With code, we can build apps, games and websites.
Code can only be read by computers
11
Which of these is the escape character for coding in Swift?
/
´
ESC
\
12
What is the value of message after this code:
"Hello"
"HelloWorld"
"World"
Hello World
13
What is wrong with this code?
+= should be =+
Nothing
The scores are wrong
score is a constant and cannot be changed
14
What is the value of score after this code:
2
0
1
This code will not work
15
What is the answer ( 3 + 12 ) + ( 12 * 2)
20
30
38
39
16
The second line below has a "use of unresolved identifier" error. What does that mean
You can't repeat names
playGroundName isn't a String
The string interpolation is done wrong; it should use a /
Names is written incorrectly; it should be playgroundName
17
What's the difference between 4 and "4"
4 can be used for arithmetic operations
There is no difference
"4" has a further meaning
4 is an integer while "4" is a string
18
Can you anticipate the result of this arithmetic operation. Select all that is correct
1000
100
We can't divide by 10
10
19
Which line is declaring a variable?
name = Johnny"
let "Johnny" = name
var name = "Johnny"
let name = "Johnny"
20
What is the result of the arithmetic operation: 3 * 3 % 4
0
1
10
1.5