WorksheetsApple Swift Coding 1 - Lesson 6 - 7
Total questions: 10
Worksheet time: 5mins
What does API stand for?
Actually Pretty Important
Application Programming Interface
Available Program Interpretation
Automatic Program Input
What best describes an algorithm?
Only calculations that use advanced mathematics
The computer equivalent of rhythm
A step by step series of operations
The same thing as an identifier
What is API?
A safety check to make sure programs work
A tool for writing programs
A rating given to experienced programmers
The set of functions you can use with a particular programming area.
Which of the following is not a benefit of using functios?
They can give you infinite loops
They keep your code organized.
They prevent repeated code
They make larger programs easier to understand
With the following code, what would you expect to see in the console in a playground?
func saySomething ( ) {
print ("Functions are awesome")
saySomething( )
}
saySomething ( )
Functions are awesome, once
Functions are awesome, twice
Functions are awesome, repeated over and over and over
Nothing
With the following code, what would you expect to see in a console playground?
func saySomething ( ) {
print ("Functions are awesome")
}
saySomething ( )
saySomething
Functions are awesome
Nothing
Something
With the following code, what would you expect to see in the console in a playground?
func saySomething ( ) {
print ("Functions are awesome")
}
Functions are awesome
saySomething
Something
Nothing
What's another word for the lines of code that a function contains?
Body
Clause
Parameters
Return Value
Which line is the correct way to declare a function?
let myFunction = func ( ) {
let func = myFunction ( ) {
func myFunction ( ) {
func = myFunction ( ) {
What don't programmers like doing?
Repeating themselves
Repeating themselves
Repeating themselves
All of the above
