Unit 4: Hello World Flashcards

1
Q

Console

A

A message centre to show details about the way a program is running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Debugging

A

the process of identifying and fixing an error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Error

A

a general term for a problem with code

e.g.,

a runtime error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Log

A

A record of information about a program as it runs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Print

A

a function that tells a Swift program to log a message to the console

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The Good Old Days

A

You may recall from an earlier playground an exercise that involved calculating the space remaining on an iPhone. You had the following information:

The capacity of an iPhone is measured in gigabytes (GB). The iPhone in question has 8GB of storage.
A gigabyte is about 1,000 megabytes (MB)
The phone already has 3GB of stuff on it
One minute of video takes 150MB of space

Create a string that tells the user how many minutes of video they can store on the phone. You’ll first need to perform the calculation steps, then use string interpolation to display the answer - which should look like this:

You can record XXX more minutes of video.

Hint: Do all of your calculations in megabytes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly