Test 1 Flashcards

1
Q

What are the pillars of computational thinking?

A

Problem decomposition, pattern recognition, abstraction, algorithm

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

What is abstraction?

A

The process that involves identifying characteristics of a problem that can be ignored when approaching a problem.

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

What kind of patterns are we looking for in pattern recognition?

A

Similar within problems
Similarities between/across problems

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

Why should you engage in problem decomposition?

A

Because it allows form more flexible solutions
Because it allows for interim progress when implementing solutions
Because two smaller problems are simpler to solve then one big one

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

Why do we write algorithm in a flowchart or pseudocode?

A

Allows us to see if we missed any patterns.
Allows us to evaluate any potential issues with your logic.
Allows us to visualize and plan the steps of an algorithm including inputs, outputs and loops.

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

What is pattern recognition?

A

The process of identifying similarities or repetitions that can lead you to a potential solution.

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

What flowchart shape would you use to indicate a decision point?

A

Diamond

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

What flowchart shape would you use to indicate the beginning or end of a program?

A

Oval

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

Flowchart:

A

Start  parallelogram (INPUT x;y)  Rectangle (sum = x + y)  Diamond (Is sum > 0?)  Parallelogram (OUTPUT: Sum is positive)  Parallelogram (OUTPUT: Sum is negative)

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

Which statements below are not reasons why we learn python?

A

Python does not support machine learning and big data
Python prevents rapid software development
Python is a perfect language without quirks.

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

Which statements are reasons of why we learn python?

A

Python is considered easy to read, write, and learn.
Python has a huge developer community and a vast choice of free libraries.

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

How to you insert a comment in python?

A

This is a comment

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

Which of the following variable names are not illegal?

A

SubTotal, __subtotal, sub_total

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

Which of the following are illegal variable names?

A

Sub-total, 34subtotal, sub/total

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

Which of the following are arithmetic operators?

A

+, %, *, //

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

What is //

A

In Python, you use the double slash // operator to perform floor division. This // operator divides the first number by the second number and rounds the result down to the nearest integer (or whole number)

17
Q

Which of the following are comparison operators?

A

==, <, <=, !=, >=

18
Q

Which of the following are NOT part of the basic data types in python?

A

Currency (cur), Modulo (mod), Integral(int), Time (time)

19
Q

Which of the following are part of the basic data types in python?

A

Float (float), Boolean (bool), String (str)

20
Q

Which of the following are type conversion functions?

A

bool (), str (), int(), float()

21
Q

Which of the following are NOT type conversion functions?

A

Integral (), Curr ()