w3resource

Scientific Notation and Variables in Python: Key Concepts for PCEP-30-02 Exam

PCEP Certification Practice Test - Questions, Answers and Explanations

This comprehensive set of questions and explanations covers the fundamental topic of introducing literals and variables into code and using scientific notation, providing a diverse set of interactions to enhance understanding and prepare for the PCEP-30-02 examination.

Question 1: Which of the following represents a number in scientific notation in Python?

  1. 1.23e3
  2. 123.0
  3. 1.23*10^3
  4. 123e

Answer: A) 1.23e3

Explanation: In Python, 1.23e3 represents 1.23×1031.23 \times 10^31.23×103, which is scientific notation.

Question 2: What is the value of the scientific notation 2.5e-4 in decimal form?

  1. 0.00025
  2. 25000
  3. 0.025
  4. 0.000025

Answer: A) 0.00025

Explanation: 2.5e-4 is equal to 2.5×10^−4, which is 0.00025.

Question 3: Which of the following are valid scientific notation representations in Python? (Select all that apply)

  1. 3.14e2
  2. 6.02e23
  3. 1.6e-19
  4. 1e

Answer: A) 3.14e2 B) 6.02e23 C) 1.6e-19

Explanation: 3.14e2, 6.02e23, and 1.6e-19 are valid scientific notation representations. 1e is invalid because it lacks a number following the exponent.

Question 4: Match the following scientific notation literals with their decimal equivalents.

Scientific Notation Decimal Equivalent
1e3 1. 0.00567
5.67e-3 2. 0.32
9.1e2 3. 1000
3.2e-1 4. 910

Answer:

  • 1e3 -> 3. 1000
  • 5.67e-3 -> 1. 0.00567
  • 9.1e2 -> 4. 910
  • 3.2e-1 -> 2. 0.32

Explanation: Each scientific notation matches its respective decimal equivalent.

Question 5: Fill in the blanks: The scientific notation 1.2e3 represents the decimal number ______, and the notation 4.5e-2 represents the decimal number ______.

Answer: The scientific notation 1.2e3 represents the decimal number 1200, and the notation 4.5e-2 represents the decimal number 0.045.

Explanation: 1.2e3 equals 1200, and 4.5e-2 equals 0.045.

Question 6: Arrange the following scientific notations in order from smallest to largest.

Scientific Notation Order
1e-3 1
1e-1 2
1e2 3
1e-2 4

Answer:

  • 1e-3
  • 1e-2
  • 1e-1
  • 1e2

Explanation: The order is based on the size of the numbers represented by the scientific notations.

Question 7: Fill in the code to assign the value 6.022e23 to a variable named avogadro.

avogadro = _______

Answer: 6.022e23

Explanation: The variable avogadro is assigned the value 6.022e23.

Question 8: Insert the missing line of code to define a variable that holds the value 9.81e0.

gravity = _______
print(gravity)

Answer: 9.81e0

Explanation: The variable gravity is assigned the value 9.81e0, which is 9.81.

Question 9: What will be the output of the following code?

mass = 1.67e-27
print(mass)
 
  1. 1.67e-27
  2. 1.67
  3. 0.00000000000000000000000000167
  4. 1.67*10^-27

Answer: A) 1.67e-27

Explanation: The scientific notation 1.67e-27 is printed as it is.

Question 10: Which of the following represents the number 5000 in scientific notation?

  1. 5e2
  2. 5e3
  3. 5e4
  4. 5e-3

Answer: B) 5e3

Explanation: 5e3 represents 5×10^3, which equals 5000.

Question 11: Which of the following statements about scientific notation in Python are true? (Select all that apply)

  1. It uses the letter e to indicate the power of 10.
  2. It can represent very large or very small numbers compactly.
  3. It requires a number before and after the e.
  4. It cannot represent negative exponents.

Answer: A) It uses the letter e to indicate the power of 10. B) It can represent very large or very small numbers compactly. C) It requires a number before and after the e.

Explanation: Scientific notation uses e for the power of 10, represents large/small numbers compactly, and requires numbers before and after e. It can represent negative exponents.

Question 12: Match the following scientific notation values with their descriptions.

Scientific Notation Descriptions
2.5e5 1. Very large number
3.14e-10 2. Represents the number 1
1e0 3. Very small number
6.02e23 4. Avogadro's number

Answer:

  • 2.5e5 -> Very large number
  • 3.14e-10 -> Very small number
  • 1e0 -> Represents the number 1
  • 6.02e23 -> Avogadro's number

Explanation: Each scientific notation value matches its description.

Question 13: Fill in the blanks: The scientific notation 2e3 represents the number ______, and the notation 3.5e-3 represents the number ______.

Answer: The scientific notation 2e3 represents the number 2000, and the notation 3.5e-3 represents the number 0.0035.

Explanation: 2e3 equals 2000, and 3.5e-3 equals 0.0035.

Question 14: Arrange the following numbers from smallest to largest based on their scientific notation.

Scientific Notation Order
1e-2 1
1e-1 2
1e1 3
1e-3 4

Answer:

  • 1e-3
  • 1e-2
  • 1e-1
  • 1e1

Explanation:The order is based on the size of the numbers represented by the scientific notations.

Question 15: Fill in the code to assign the scientific notation value 3.14e-2 to a variable named small_number.

small_number = _______

Answer: 3.14e-2

Explanation: The variable small_number is assigned the value 3.14e-2.

Question 16: Insert the missing line of code to define a variable that holds the value 1.23e4.

large_number = _______
print(large_number)

Answer: 1.23e4

Explanation: The variable large_number is assigned the value 1.23e4, which is 12300.

Question 17: What will be the output of the following code?

speed_of_light = 3.0e8
print(speed_of_light)
  1. 3.0e8
  2. 300000000
  3. 3.0*10^8
  4. 3.0 x 10^8

Answer: A) 3.0e8

Explanation: The scientific notation 3.0e8 is printed as it is.

Question 18: Which of the following represents the number 0.0001 in scientific notation?

  1. 1e-3
  2. 1e-4
  3. 1e4
  4. 1e3

Answer: B) 1e-4

Explanation: 1e-4 represents 1×10^−4, which equals 0.0001.

Question 19: Which of the following are valid uses of scientific notation in Python? (Select all that apply)

  1. 4e5
  2. 2.1e-3
  3. 7e
  4. 1e2

Answer: A) 4e5 B) 2.1e-3 D) 1e2

Explanation: 4e5, 2.1e-3, and 1e2 are valid uses of scientific notation. 7e is invalid because it lacks a number following the exponent.

Question 20: Match the following scientific notations with their equivalent standard notations.

Scientific Notation Standard Notation
5e1 1. 0.012
1.2e-2 2. 0.45
7.89e3 3. 50
4.5e-1 4. 7890

Answer:

  • 5e1 -> 3. 50
  • 1.2e-2 -> 1. 0.012
  • 7.89e3 -> 4. 7890
  • 4.5e-1 -> 2. 0.45

Explanation: Each scientific notation matches its equivalent standard notation.

Question 21: Fill in the blanks: The scientific notation 1.5e2 represents the number ______, and the notation 6.7e-1 represents the number ______.

Answer: The scientific notation 1.5e2 represents the number 150, and the notation 6.7e-1 represents the number 0.67.

Explanation: 1.5e2 equals 150, and 6.7e-1 equals 0.67.

Question 22: Arrange the following scientific notations in order from largest to smallest.

Scientific Notation Order
2e2 1
3e1 2
1e3 3
5e0 4

Answer:

  • 1e3
  • 2e2
  • 3e1
  • 5e0

Explanation: The order is based on the size of the numbers represented by the scientific notations.

Question 23: Fill in the code to assign the scientific notation value 4.5e6 to a variable named population.

population = _______

Answer: 4.5e6

Explanation: The variable population is assigned the value 4.5e6.

Question 24: Insert the missing line of code to define a variable that holds the value 8.31e-3.

constant = _______
print(constant)

Answer: 8.31e-3

Explanation: The variable constant is assigned the value 8.31e-3, which is 0.00831.

Question 25: What will be the output of the following code?

distance = 1.5e11
print(distance)
  1. 1.5e11
  2. 150000000000
  3. 1.5*10^11
  4. 1.5 x 10^11

Answer: A) 1.5e11

Explanation: The scientific notation 1.5e11 is printed as it is



Follow us on Facebook and Twitter for latest update.