Sample Exam Questions for CPIT 110: Problem-Solving and Programming

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

flashcard set

Earn XP

Description and Tags

These flashcards cover key concepts and questions regarding functions in Python, as presented in the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

10 Terms

1
New cards

What does a function that does not return a value return by default?

None

2
New cards

What must a function header include?

Function name and parameter list.

3
New cards

Can a function have no parameters?

Yes, a function may have no parameters.

4
New cards

What symbol is used to invoke functions' arguments?

Parentheses.

5
New cards

Does the below function call cause syntax errors? import math def main(): math.sin(math.pi) main()

No.

6
New cards

What is the memory area where parameters and local variables are stored called?

A stack.

7
New cards

Which of the following functions should be defined as a None function?

Write a function that prints integers from 1 to 100.

8
New cards

What does a function with no return statement return?

None.

9
New cards

What should the missing function body be in def f(number): # Missing function body?

return number.

10
New cards

How can you correctly invoke a function defined as def f(p1, p2, p3, p4)?

f(1, 2, 3, 4).