IOS601- MIDTERM

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

1/58

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

59 Terms

1
New cards

Which of the following is NOT a benefit of using Git?

File compression

2
New cards

What does git clone do?

Duplicates an existing repository from a remote source

3
New cards

What is the purpose of GitHub?

A cloud-based platform for Git repositories

4
New cards

Which of the following is NOT a basic Linux command?

git init

5
New cards

What does ls -l do in Linux?

Lists files in long format

6
New cards

What is Git?

A distributed version control system

7
New cards

What command is used to generate an SSH key?

ssh-keygen

8
New cards

What is the primary function of Linux?

An open-source operating system kernel

9
New cards

What is the kernel in an operating system?

The core that interacts with hardware

10
New cards

What is the purpose of git commit -m 'message'?

To save changes with a commit message

11
New cards

How do you check the status of a Git repository?

git status

12
New cards

What is the purpose of WSL (Windows Subsystem for Linux)?

To run a Linux environment on Windows

13
New cards

What command is used to create a virtual environment in Python?

python -m venv venv

14
New cards

What is the role of pip install -r requirements.txt?

Installs all dependencies listed in requirements.txt

15
New cards

What does git pull do?

Fetches and merges changes from a remote repository

16
New cards

What is the purpose of Live Server in VS Code?

To run a local development server for web applications

17
New cards

What command is used to check the Python version installed on a system?

python --version

18
New cards

What is the purpose of a Python virtual environment (venv)?

To manage dependencies and isolate projects

19
New cards

What is the purpose of the WSL extension in VS Code?

To enable Linux-based development on Windows

20
New cards

What is GitHub used for?

A platform for hosting Git repositories

21
New cards

What does the pytest framework do?

Runs automated tests in Python

22
New cards

What is polymorphism in OOP?

The ability of a function to perform different tasks based on input

23
New cards

What is an instance in OOP?

A specific object created from a class

24
New cards

What does super() do in Python?

Calls the constructor of the parent class

25
New cards

What does @classmethod do in Python?

Defines a method that takes the class (cls) as the first argument

26
New cards

What is the difference between assertEqual() and assertNotEqual()?

assertEqual() checks if values are equal, assertNotEqual() checks if they are different

27
New cards

What is abstraction in OOP?

Hiding complex implementation details and exposing only the necessary parts

28
New cards

What is the difference between deepcopy() and copy()?

deepcopy() creates independent copies, while copy() creates a reference copy

29
New cards

What is the purpose of mocks in unit testing?

To simulate external dependencies in testing

30
New cards

What does the init method do in Python classes?

Initializes an instance of a class

31
New cards

What is a metaclass in Python?

A class that defines the behavior of other classes

32
New cards

What does @property do in Python?

Makes a method behave like an attribute

33
New cards

What is an interface in Python?

A class that defines methods without implementing them

34
New cards

What is the purpose of a design pattern in software development?

To provide reusable solutions for common problems

35
New cards

What does duck typing mean in Python?

Determining an object's behavior based on its methods rather than its class

36
New cards

What is multiple inheritance in Python?

When a class inherits from more than one class

37
New cards

What does call() do in Python?

Makes an object callable like a function

38
New cards

How do you prevent method overriding in a subclass?

By using the final keyword

39
New cards

How do you check if an object is an instance of a specific class?

isinstance(object, class)

40
New cards

What is the Strategy design pattern used for?

Defining a family of algorithms and making them interchangeable

41
New cards

What is the primary purpose of the Observer pattern?

Manage event-driven programming by notifying multiple objects

42
New cards

What is the purpose of logging in Python?

Debugging and monitoring applications

43
New cards

What does the Facade design pattern do?

Provides a simplified interface to a larger system

44
New cards

What does undo do in the calculator program?

Reverts the last operation

45
New cards

What is the purpose of a .env file in a Python application?

Store environment variables for configuration

46
New cards

What is an ORM in Python?

Object Relational Mapping

47
New cards

What is an .ini file used for?

Configuration settings

48
New cards

What does clear do in the calculator?

Clears calculation history

49
New cards

Why is maintaining a clear commit history in Git important for the midterm project?

It ensures academic integrity and tracks project progress

50
New cards

How is calculation history stored in the midterm project?

Using a pandas DataFrame and CSV file

51
New cards

What is the primary goal of the midterm assessment in Module 6?

To evaluate understanding of OOP, design patterns, and data management

52
New cards

What command is used to activate a virtual environment in Linux?

source venv/bin/activate

53
New cards

What principle should be followed to avoid code duplication in the midterm project?

DRY (Don't Repeat Yourself)

54
New cards

What is the role of the Memento pattern in the midterm project?

To enable undo and redo functionality

55
New cards

Why is input validation important in the calculator application?

To ensure user inputs are correct and within valid ranges

56
New cards

What happens if a required environment variable is missing in the .env file?

The program assigns a default value

57
New cards

What does the calculator_memento.py file implement?

Memento Pattern for undo/redo functionality

58
New cards

What is the function of the pytest --cov=app --cov-fail-under=90 command in GitHub Actions?

To measure test coverage and enforce a 90% minimum

59
New cards