computer programming

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

1/18

flashcard set

Earn XP

Description and Tags

module r2

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

The Python keyword used to define a function.

def

2
New cards

Type of error caused by incorrect code structure or missing syntax.

Syntax Error

3
New cards

The built-in function used to determine the length of a sequence.

len()

4
New cards

A Boolean operator that returns True only if both conditions are true.

and

5
New cards

This Python statement allows you to handle exceptions and prevent crashes.

try-except

6
New cards

A concise way to create lists, sets, or dictionaries using loops and conditions.

Comprehension

7
New cards

The keyword used to manually trigger an exception.

raise

8
New cards

Python’s approach that executes code line-by-line without compilation.

Interpreted language

9
New cards

A method of simplifying nested loops by checking invalid cases first.

Inversion

10
New cards

(true or false) The for loop in Python executes a block of code repeatedly until a condition becomes False.

Falsewhile loop executes until condition is false

11
New cards

(true or false) The break statement is used to skip the current iteration of a loop.

Falsecontinue skips the current iteration

12
New cards

(true or false) n Python, keywords can be used as variable names.

False → Keywords cannot be used as variable names

13
New cards

(true or false) The try block is used to contain code that may raise an exception.

true

14
New cards

(true or false) A ZeroDivisionError occurs when an undefined variable is used.

False → That’s a NameError

15
New cards

The finally block executes only when no exception occurs.

Falsefinally executes regardless of errors

16
New cards

Using deeply nested loops improves readability and computing speed.

False → It reduces readability and speed

17
New cards

The keyword async is used for asynchronous programming in Python.

true

18
New cards

Python’s approach that executes code line-by-line without compilation.

true

19
New cards

The function int() converts a string into an integer value.

true

Explore top flashcards

APUSH Period 3 Terms
Updated 68d ago
flashcards Flashcards (42)
Patosz definiciók
Updated 760d ago
flashcards Flashcards (117)
hamlet critic quotes
Updated 977d ago
flashcards Flashcards (65)
Voc 29+30
Updated 290d ago
flashcards Flashcards (151)
Unit 5 MWH
Updated 1075d ago
flashcards Flashcards (24)
chapter 5 quizlet
Updated 1011d ago
flashcards Flashcards (20)
APUSH Period 3 Terms
Updated 68d ago
flashcards Flashcards (42)
Patosz definiciók
Updated 760d ago
flashcards Flashcards (117)
hamlet critic quotes
Updated 977d ago
flashcards Flashcards (65)
Voc 29+30
Updated 290d ago
flashcards Flashcards (151)
Unit 5 MWH
Updated 1075d ago
flashcards Flashcards (24)
chapter 5 quizlet
Updated 1011d ago
flashcards Flashcards (20)