Python Flashcards

1
Q

What is Python?

A

It is a computer language, used to create various types of applications

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

What is an IDE?

A

This is an environment that enables development of python programs

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

Describe how an interpreter works

A

It works by reading and analyzing code LINE by LINE from top to bottom

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

What does an interpreter do when it encounters an error?

A

It may stop what it is doing and let you know about the error

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

Describe how a compiler works

A

It runs the code from top to bottom and shows everything including the results at once
producing an executable file

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

What are Integers

A

These are natural numbers that have one or a combination of digits

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

What is an example of an integer

A

9886867 or 1,2456,93 or any number

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

What is a string?

A

A string is a character or a group of characters considered in one unit

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

Create a string in the parentheses of
print()

A

print(“whatever”)

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

What is a floating - point number?

A

Is a number made in one or two parts

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

What is an operator and operation

A

Operator-Is a symbol that acts one one or two values

Operation- A group of items that, when used together, must produce a result.

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

What is an operand?

A

The value participating in operations

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

When is floor division used?

A

When you are not interested in the fractional part of the result
symbol is - //

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

Where is % used ?

A

In remainders ,after division has been perfomed.

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

What is a comment?

A

It is text written in a document but that isn’t considered as code

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

How do you create a comment

A

By starting with a # and creating a one line sentence

17
Q

What indicates the end of a statement?

A

semi-colon

18
Q

What is parentheses?

A

Used to create an isolated section that must be empty or have a list of items

19
Q

What can be used to isolate a particular operation?

A

parentheses

20
Q

How do you make a multi-line comment?

A

Use of 6 double quotes
3 in the opening and 3 at the end

21
Q

What is escape sequence?

A

Is a special character that displays non-visibility

22
Q

How is escape sequence represented?

A

By a backslash character

23
Q

hwta is inferred language

A

the value you assign to a variable can be read by compilier to know what variable it is