White Belt Flashcards Preview

Python Cert > White Belt > Flashcards

Flashcards in White Belt Deck (47)
Loading flashcards...
1
Q

Python is an example of:
A) A hight-level programing language
B) A machine language
C) A natural language

A

A) A hight-level programing language

2
Q

A Complete set of known commands is called:
A) a machine list
B) an instruction list
C) A low-level list

A

B) An instruction list

3
Q

What is a source code?
A) Another name for a source file
B) A program written in a high-level programming language
C) Machine code executed by computers

A

B) A program written in a high-level language

4
Q

What do you call a computer program which directly executes instructions written in a programming language?
A) A translator
B) An interpreter
C) A compiler

A

B) An interpreter

5
Q

What Python version is covered in this course?
A) Python 1
B) Python 3
C) Python 2

A

B) Python 3

6
Q

What is CPython?
A) A compiled language is used to perform high-level programming functions.
B) The default implementation of the Python programming language
C) Another name for Cython, a superset of the Python programming language.

A

B) The default implementation of the Python programming language

7
Q

What is Idle?
A) An acronym that stands for Integrated Development and Learning Environment for Python
B) A version of Python
C) An acronym that stands for Interactive Development and Learning Extension

A

A) An acronym that stands for Integrated Development and Learning Environment for Python

8
Q

What do you call a tool that lets you launch your code step-by-step and inspect it at each moment of execution?
A) An editor
B) A console
C) A debugger

A

C) A debugger

9
Q

How did Python, the programming language, get its name?
A) Guido van Rossum named it to honor Python of Catana, a dramatic poet of the time of Alexander the Great
B) Guido van Rossum named it to honor Monty Pyhon’s Flying Circus, a BBC comedy series popular in the 1970s
C) Guido van Rossum named it after the Pythonidae - a family of large, nonvenomous snakes

A

B) Guido van Rossum named it to honor Monty Pyhon’s Flying Circus, a BBC comedy series popular in the 1970s

10
Q

Which one of the following is an example of a Python file extension?
A) py
B) pi
C) p

A

B) pi

11
Q
What do you call a file containing a program written in a high-level programming language?
A) A target file
B) A code file
C) A machine file
D) A source file
A

D) A source file

12
Q

What are the four fundamental elements that make a language?
A) An alphabet, a lexis, phonetics, and semantics
B) An alphabet, a lexis, a syntax, and sematics
C) An alphabet, phonetics, phonology, and sematics
D) A alphabet, morphology, phonetics, and sematics.

A

B) An alphabet, a lexis, a syntax, and sematics

13
Q

What is machine code?
A) A low-level programming language consisting of hexadecimal digits that make up high-level language instructions.
B) A low-level programming language consisting of instruction lists that humans can read and understand
C) A high-level programming language consisting of instruction lists that humans can read and understand
D) A medium-level programming language consisting of the assembly code designed for the computer processor.

A

B) A low-level programming language consisting of instruction lists that humans can read and understand

14
Q

What is the expected behavior of the following program?
prin(“Goodbye!”)
A) The program will output Goodbye! on the screen
B) The program with output (“Goodbye!”)
C) The program with output(“Goodbye!”)
D) The program will generate an error message on the screen

A

D) The program will generate an error message on the screen

15
Q
What do you call a command-line interpreter which lets you interact with your OS and execute Python commands and scripts?
A) jython
B) A compiler
C) A console
D) An editor
A

C) A console

16
Q

Select the true statement(Select two answers)
A) Python is free, open-source, and multiplatform
B) Python 3 is backwards compatible with Python 2
C) Python is a good choice for creating and executing test for applications.
D) Python is a good choice for low-level programing, e.g., when you want to implement an effective drive

A

A) Python is free, open-source, and multiplatform

C) Python is a good choice for creating and executing test for applications.

17
Q

What is true about compilation? (Select two answers)
A) Both you and the end user must have the compiler to run your code
B) It tends to be faster than interpretation
C) The code is converted directly into machine code executable my the processor
D) It tends to be slower than interpretation.

A

B) It tends to be faster than interpretation

C) The code is converted directly into machine code executable my the processor

18
Q

What is the expected behavior of the following program?
print(“Hello!”)
A) The program will generate an error message on the screen
B) The program will output Hello! to the screen
C) The program will output (“Hello!”)to the screen
D) The program will output “Hello!” to the screen

A

B) The program will output Hello! to the screen

19
Q

What is the best definition of a script?
A) It’s an error message generated by the interpreter
B) it’s an error message generated by the compiler
C) it’s a text file that contains sequences of zeroes and ones
D) it’s a text file that contains instructions that make up a Python program.

A

D) it’s a text file that contains instructions that make up a Python program.

20
Q

The escape character owes its name to the fact that it:
A) changes the meaning of the character next to it
B) escapes from the source file into the computer memory
C) cannot be caught due to its high speed

A

A) changes the meaning of the character next to it

21
Q

The meaning of the positional parameter is determined by its:
A) name
B) position
C) appearance

A

B) position

22
Q

The most important difference between integer and floating-point numbers lies in the fact that:
A) they are stored differently in the computer memory
B) They cannot be used simultaneously
C) integers cannot be literals, while floats can

A

A) they are stored differently in the computer memory

23
Q

The 0x prefix means that the number after it is denoted as:
A) a hexadecimal
B) an octal
C) a decimal

A

A) a hexadecimal

24
Q

The // operator:
A) performs integer division
B) performs regular division
C) does not exist

A

A) performs integer division

25
Q
The result of the following addition:
123 + 0.0
A) is equal to 123
B) cannot be evaluated
C) is equal to 123.0
A

C) is equal to 123.0

26
Q

Only one of the following statements is true - which one?
A) addition precedes multiplication
B) multiplication precedes addition
C) neither statement can be evaluated

A

B) multiplication precedes addition

27
Q
Right-sided binding means that the following expression:
1 ** 2 ** 3
A) from left to right
B) from right to left
C) in random order
A

B) from right to left

28
Q

A keyword is a word that:(Select two answers)
A) is the most important word in the whole program
B) cannot be used as a variable name
C) cannot be used as a function name

A

B) cannot be used as a variable name

C) cannot be used as a function name

29
Q

A value returned by the input() function is:
A) an integer
B) a float
C) a string

A

C) a string

30
Q
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively?
x = input()
y = input()
print(x + y)
A) 6
B) 4
C) 24
D) 2
A

C) 24

31
Q
The result of the following division:
1 / 1
A) is equal to 1
B) is equal to 1.0
C) cannot be evaluated
D) cannot be predicted
A

B) is equal to 1.0

32
Q
The ** operator:
A) performs float-point multiplication
B) performs duplicated multiplication
C) does not exist
D) performs exponentiation
A

D) performs exponentiation

33
Q
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively?
x = int(input())
y = int(input())
print(x + y)
A) 24
B) 6
C) 2
D) 4
A

B) 6

34
Q
What is the output of the following snippet if the user enters two lines containing 2 and 4 respectively?
x = input(input())
y = input(input())
x = x // y
y = y // x
print(y)
A) the code will cause a runtime error
B) 4.0
C) 2.0
D) 8.0
A

A) the code will cause a runtime error

35
Q

The meaning of the keyword parameter is determined by:
A) its position within the argument list
B) its value
C) the argument’s name specified along with its value
D) its connection with existing variables

A

C) the argument’s name specified along with its value

36
Q
What is the output of the following snippet if the user enters two lines containing 3 and 6 respectively?
x = input()
y = int(input())
print(x * y)
A) 666
B) 36
C) 18
D) 333333
A

D) 333333

37
Q
Which of the following variable names are illegal? (Select two answers)
A) TRUE
B) true
C)True
D) and
A

C)True

D) and

38
Q
What is the output of the following snipper if the user enters two lines containing 2 and 4 respectively?
x = int(input())
y = int(input())
x = x / y
y = y / x
print(y)
A) 2.0
B) 4.0
C) 8.0
D) The code will cause a runtime error
A

C) 8.0

39
Q
The value twenty point twelve times ten raised to the power of eight should be written as: 
A) 20.12*12*10^8
B) 10.12E8.0
C) 20.12E8
D) 20E12.8
A

C) 20.12E8

40
Q

The \n digraph forces the print(0 function to:
A) break the output line
B) stop its execution
C) duplicate the character next to the digraph
D) output exactly two characters: \ and n

A

A) break the output line

41
Q

What is the output of the following snippet if the user enters two lines containing 11 and 4 respectively?
x = int(input())
y = int(input())

x = x % y
x = x % y
y = y % x

print (y)

A) 1
B) 4
C) 3
D) 2

A

A) 1

42
Q

The print() function can output values of:
A) not more than five arguments
B) just one argument
C) any number of arguments (excluding zero)
D) any number of arguments(including zero)

A

D) any number of arguments(including zero)

43
Q

What is the output of the following snippet?
y = 2 + 3 * 5.
print(Y)
A) 17
B) 17.0
C) the snippet will cause an execution error
D) 25.

A

C) the snippet will cause an execution error

44
Q
Left-sided binding determines that the result of the following expression:
1 // 2 * 3
is equal to: 
A) 0.0
B) 0.16666666
C) 4.5
D) 0
A

D) 0

45
Q
the 0o prefix means that the number it is denoted as:
A) binary
B) hexadecimal
C) octal
D) decimal
A

C) octal

46
Q
x = 1 / 2 + 3 // 3 + 4 ** 2
print(x) 
A) 17
B) 8.5
C) 8
D) 17.5
A

D) 17.5

47
Q
x = 1 / 2 + 3 // 3 + 4 ** 2
print(x) 
A) 17
B) 8.5
C) 8
D) 17.5
A

D) 17.5