Python from Udemy DS Course Flashcards

Basic Python and use for stats

You may prefer our related Brainscape-certified flashcards:
1
Q

the usual name for Human Readable Code?

A

Source Code

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

A formal definition of programming?

A

Taking a task, writing it down in a programming language that the computer can understand and execute

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

What is the difference between computer science and programming?

A

‘Computer science’ is about what computers CAN do.

‘Programming’ is telling a computer WHAT to do

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

What are the following languages good for:
PHP
C++
Python and ‘R’

A

PHP = Web programming
C++ = programming devices
Python and ‘R’ = Data science and finance

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

What is being created in the following code, and what does it do:

def plus_ten (x):
      return x + 10
A

A function called ‘plus_ten’ which takes a variable ‘x’ as input, and returns ‘x’ + 10

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

Why should you learn python?

A

Powerful calculation tools, extendable, multi platform, with intuitive syntax and is easy to learn

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

Give an example of something that allows Python to be used for web programming

A

The django framework

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

Is python a high level or low level language?

A

Low level languages are machine code (closer to the metal)

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

what sort of document has a *.ipynb extension?

A

Python Notebook Document, saved by ‘Jupyter’

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

What is Jupyter and what does it does it do?

A

It store scripts, that can include human readable text, code, AND output such as graphs and results

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

What is Anaconda

A

A software package that contains BOTH Python and Jupyter and PACKAGES for scientific computing and data science

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

What is an operand?

A

What an operator operates on.

in ‘4 + 3’ the 4 and the 3 are operands, and the ‘+’ is an operator

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

What are identity operators?

A

‘is’ and ‘is not’ function similar to == and !=

work with boolean true false as well

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

what does the abs(x) function do?

A

It returns the the non-negative value of x without regard to its sign value of a number.

abs stands for ‘absolute’ number

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

what does the function pow(x,y) do?

A

returns x to the power of y

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

what does the function round(x,y) do?

A

returns the float of its argument (x), rounded to a specified number of digits (y) after the decimal point

17
Q

what would the following method do?

participants.extend([‘George’,’Cate’])

A
18
Q

How can you get help on a function?

A

either:
function?
or
help(function)

19
Q

what are ‘np’ and ‘pd’?

A

import pandas as pd:
You are importing the pandas library with an alias pd.
Instead of writing pandas.function each time, a short form pd.function is preferred.

same with import numpy as np