Functional Programming 1

Functional Programming 1

12th Grade

13 Qs

quiz-placeholder

Similar activities

List and Method in Computer Science Essentials

List and Method in Computer Science Essentials

12th Grade

11 Qs

CodeHS Basic Data Structures in Python

CodeHS Basic Data Structures in Python

9th Grade - University

10 Qs

Python Unit  8 Quiz

Python Unit 8 Quiz

9th - 12th Grade

15 Qs

Python lists and tuples

Python lists and tuples

12th Grade

10 Qs

CS1 Unit 8 Review

CS1 Unit 8 Review

9th - 12th Grade

18 Qs

Python List

Python List

4th Grade - University

15 Qs

2D Lists and Arrays

2D Lists and Arrays

10th - 12th Grade

15 Qs

Function Revision

Function Revision

12th Grade

10 Qs

Functional Programming 1

Functional Programming 1

Assessment

Quiz

Computers

12th Grade

Hard

Created by

O Hawkridge

FREE Resource

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).

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?