Search Header Logo

Functional Programming 1

Authored by O Hawkridge

Computers

12th Grade

Used 1+ times

Functional Programming 1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

13 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a programming paradigm?

A pattern or model for how to program

A type of procedure or function

A suite of coding environments

A programming language with immutable data structures

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In which programming paradigm are programs constructed by applying and composing functions?

Procedural

Object Oriented

Declarative

Functional

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the head of this list: myList = [2, 3, 67, 89, 4]

2

3, 67, 89, 4

2, 3, 67

67, 89, 4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate
myList = [2, 3, 67, 89, 4]
length myList

5
4
2
2, 3, 67, 89, 4

5.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

What are two key features of functional programming? (PICK 2)

Executes line by line

Immutability

Lists

Statelessness

No ability to add comments

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these languages follows the functional paradigm most strongly?

Python

Haskell

Java

C++

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate

fruits = ["Apple", "Honeydew", "Watermelon", "Kiwi", "Pear"]

tail (tail (fruits))

["Kiki", "Pear"]

"Watermelon", "Kiwi", "Pear"

"Honeydew", "Watermelon", "Kiwi", "Pear"

["Watermelon", "Kiwi", "Pear"]

Answer explanation

The tail function always returns a list (square brackets).

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?