Module 1 Flashcards

1
Q

What are the strengths of Python?

A
  • Ease of use
  • Readable
  • Complete
  • Cross-platform
  • Free
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

This strength of Python talks about how Python uses familiar constructs like loops and arrays from other coding languages.

A

Ease of Use

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

This strength of Python talks about how Python is easier to debug, maintain, and modify.

A

Readable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

This strength of Python talks about how Python’s standard library comes with modules.

A

Complete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This strength of Python talks about how Python works on Windows, Mac, Linux, UNIX, and other platforms.

A

Cross-platform

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

This strength of Python talks about how Python was developed under an open-source model.

A

Free

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

It is a browser-based application that provides an environment for running and testing Python codes.

A

Jupyter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False
Jupyter is ideal for documentation purposes which make both ease of sharing and code replicability possible.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What happens when you launch Jupyter?

A
  • opens a browser window
  • runs a command line interface (Jupyter Notebook server)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Where can users access Jupyter Notebook?

A

localhost

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This URL indicates the user’s connection to the Jupyter Notebook Server.

A

localhost:8888

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

It is a component of Jupyter which is accessible via web browser.

A

Dashboard

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The dashboard displays files and folders located where?

A

home directory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

It is a place to write in code or text.

A

Cell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A cell is indicated by a ___________, which is enclosed in a box.

A

cell block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the two types of a cell?

A
  • Code
  • Markdown
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

This cell is intended for typing in and running python codes.

A

Code Cell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

This cell allows the user to create formatted text.

A

Markdown Cell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

In a markdown cell, what is used to create a header for a section?

A

singe hash (#)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In a markdown cell, what is used to create a header for a subsection?

A

double hash (##)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

In a markdown cell, what is used to create bold texts?

A

encapsulating double asterisks (text)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

In a markdown cell, what is used to create italicized texts?

A

encapsulating single asterisks (text)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

In a markdown cell, what is used to create highlighted texts?

A

encapsulating backticks (text)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the two modes in Jupyter?

A
  • Edit
  • Command
25
Q

This mode of Jupyter is indicated by a green line in the leftmost par of an active cell.

A

Edit

26
Q

This mode of Jupyter is indicated by a blue line in the leftmost par of an active cell.

A

Command

27
Q

What is the shortcut keys to run a code in a Jupyter cell?

A

Shift + Enter

28
Q

This is the number that Jupyter assigns to remember which codes are executed first.

A

Execution Numbers

29
Q

True or False
Execution numbers are found in the leftmost part of the executed code cells.

A

False - found in the rightmost part

30
Q

This is the basic output command of Python.

A

print()

31
Q

True or False
print() can’t join plain text with values of numerical expression.

A

False - print(“1 + 1 =”, 1+1) is possible

32
Q

What are the basic numerical operations in Python?

A
  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Exponentiation (**)
  • Modulo (%)
  • Integer Division (//)
33
Q

It is an external python file that can be imported to a current python file.

A

Module | import module_name (import math)

34
Q

True or False
Modules are where functions and other resources are coded in.

A

True

35
Q

True or False
Modules allows the user to access a collection of scripts.

A

False - allows to access a collection of functions

36
Q

What is the syntax of math functions?

A

math.function_name

37
Q

True or False
Python can be used to compare values.

A

True, Python can use Logical Operators

38
Q

The keywords ____ and ____ when dealing with multiple comparisons.

A

and, or

39
Q

The keyword ____ is used to denote a negation of a comparison result.

A

not

40
Q

What command allows the user to see all the variables in the current Jupyter notebook?

A

%whos

41
Q

What are the datatypes available in Python?

A
  • Numeric (int, float, complex)
  • String (str)
  • Sequence (list, tuple, range)
  • Mapping (dict)
  • Boolean (bool)
  • Set (set, frozeenset)
42
Q

What data type are int, float, and complex?

A

Numeric

43
Q

What data type is str?

A

String

44
Q

What data type are list, tuple, and range?

A

Sequence

45
Q

What data type is dict?

A

Mapping

46
Q

What data type is bool?

A

Boolean

47
Q

What data type are set and frozeenset?

A

Set

48
Q

This data type holds numeric values.

A

Numeric

49
Q

This data type holds a sequence of characters.

A

String

50
Q

This data type holds a collection of items.

A

Sequence

51
Q

This data type holds data in key-value pair form.

A

Mapping

52
Q

This data type holds either true or false.

A

Boolean

53
Q

This data type holds a collection of unique items.

A

Set

54
Q

This command is used to determine the type of data stored in a variable.

A

type()

55
Q

This command is used to take user input.

A

input()

56
Q

This command converts a value to an integer.

A

int()

57
Q

This command converts a value to a float.

A

float()

58
Q

This command rounds a value to a specified precision.

A

round()