CMI Data Science
    Mock Tests
    Verified Solutions Included
    Mock Test 7 for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Mock Test 7 for CMI Data Science: 40 exam-level questions, detailed solutions and performance analysis. First questions free.

    40 Qs

    Total Questions

    84 Marks

    Total Marks

    147.49 Mins

    Duration

    +3 / -1 / 0

    Marking Scheme

    Section-wise Paper Structure

    School Level Mathematics

    17 Qs

    43% of total marks

    Probability Theory

    10 Qs

    25% of total marks

    Discrete Mathematics

    10 Qs

    25% of total marks

    Programming

    3 Qs

    8% of total marks

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1
    2025 PYQ
    Level 3: Exam Standard

    Consider the following polynomial of positive degree

    Show that there is no real number such that when is even.

    Question 2
    Level 3: Exam Standard

    Let . How many local extrema does have?

    Question 3
    Level 3: Exam Standard

    Let be a polynomial of odd degree and be a polynomial of even degree , both with real coefficients. Which of the following statements is ALWAYS true?

    Question 4
    2019 PYQ
    Level 3: Exam Standard

    Suppose is a continuous distribution with probability density function

    where is the normalizing constant. Find the value of and the expected value of the distribution.

    Question 5
    2026 PYQ
    Level 3: Exam Standard

    Common Description:

    Question (6) and (7) are based on the following information

    A list is an arrangement of natural numbers in a random order, with all orderings equally likely. We say that a position is a new maximum if for all . For example, in the list

    positions 1,3,5 are new maxima. Note that position 1 is always a new maximum. Now answer the two questions below based on this information.

    For a given , determine the probability that position is a new maximum.

    Question 6
    2023 PYQ
    Level 3: Exam Standard
    Burger Paradise plans to expand to other cities and is considering opening a new branch in Coimbatore. They have identified three potential locations, and , and are evaluating the profitability of each location. Based on their research, they estimate that the fixed cost for opening a new location will be ₹50,00,000, ₹70,00,000 and ₹65,00,000 at and , respectively. They also estimate the variable cost per customer to be ₹85 and the average revenue per customer to be ₹150 at all three locations. They expect to serve 100,000, 150,000 and 130,000 customers in the first year at locations and , respectively
    Which location in Coimbatore is expected to be the most profitable in the first year of operation, and what is the expected profit at this location?
    Question 7
    2021 PYQ
    Level 3: Exam Standard
    There are two longest subsequences, not necessarily contiguous, common to the strings “ARTIFICIAL” and “INTELLIGENCE”. They are “IIC” and “TIC” which are of length three.
    Consider two strings S1 = “CORONAVIRUS” and S2 = “SARSCOVID”. Let be the length of a longest common subsequence between S1 and S2 and let be the number of such longest common subsequences of length between S1 and S2. What is ?
    Question 8
    Level 3: Exam Standard

    In a class of 56 students, each student plays at least one of two games: Chess () or Carrom (). The number of students playing only Chess is twice the number playing only Carrom. If the number playing Chess exceeds the number playing Carrom by 8, how many students play only Carrom?

    Question 9
    Level 3: Exam Standard

    Let and . How many surjective functions satisfy the condition ?

    Question 10
    Level 3: Exam Standard

    Consider the following pseudocode:

    ```

    function h(n):

    total = 0

    for i from 1 to n:

    total = 0

    for j from 1 to i:

    total = total + j

    return total

    ```

    Which of the following cannot be the output of h(n) for any positive integer n?

    Question 11
    Level 4: Challenger

    Consider the following three recursive functions defined for non-negative integers :

    ```python

    def f(n):

    if n == 0: return 1

    return f(n-1) + 2*n - 1

    def g(n):

    if n == 0: return 10

    if n % 4 == 0: return g(n-1) + 20

    return g(n-1) - 5

    def h(n):

    if n == 0: return 0

    return h(n-1) + 3*n

    ```

    Which of the following correctly ranks the values of , , and in increasing order?

    Question 12
    Level 3: Exam Standard

    Consider the correct algorithm for finding the second largest distinct element, which maintains two variables largest and second_largest, both initialized to . During a left-to-right scan of an array, the pair (largest, second_largest) transitions through a sequence of states. Which of the following state transitions is strictly impossible during the execution of this correct algorithm on any valid array?

    Unlock All 40 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More CMI Data Science Mock Tests

    Free preview ends here

    Login to view the complete test and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Mock Test 7 for CMI Data Science: 40 Questions with Solutions & Analysis

    Attempt the Mock Test 7 for CMI Data Science: 40 exam-level questions, detailed solutions and performance analysis. First questions free.

    Paper breakdown

    40 questions · 84 marks · 147.49 minutes. School Level Mathematics: 17 · Probability Theory: 10 · Discrete Mathematics: 10 · Programming: 3

    Free sample questions from Mock Test 7

    Question 1 · School Level Mathematics · 2025 SUB

    Consider the following polynomial of positive degree

    Show that there is no real number such that when is even.

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: Multiply by to telescope the arithmetico-geometric series into a geometric sum plus one tail term, then exploit the parity of to force every piece positive when .

    Exam route:

    1. : all terms non-negative, constant is 1 .
    2. : multiply by .
    3. .
    4. even odd .
    5. Geometric sum . Both parts positive .

    Learning route:

    This is a sign-analysis / bounding question, recognisable because it asks to "show there is no real number " making the polynomial zero. The trigger is the phrase "no real root" combined with a polynomial whose coefficients are all positive — you cannot just read off the sign for negative because the terms alternate.

    Step 1 — Non-negative .

    When , every term is non-negative and the constant term is , so

    No root exists in .

    Step 2 — Negative : the telescoping trick.

    For the terms alternate in sign, so direct inspection fails. Multiply by , which is strictly positive when and therefore preserves the sign of :

    Step 3 — Exploit the parity of .

    Since is even, is odd. For , , so the tail term is strictly positive.

    The remaining part is a geometric series:

    Since , the numerator . The denominator . Thus, the fraction is strictly positive.

    Step 4 — Conclusion.

    We have . Since , we can divide by it without flipping any signs to get for all . Combined with Step 1, for all real , so it has no real roots.

    Question 2 · School Level Mathematics SUB

    Let . How many local extrema does have?

    Correct Answer:

    2

    Step-by-Step Solution

    Key idea: This is a local extrema counting question for a product of a polynomial and an exponential. Factor the derivative completely and count sign changes.

    Step 1: Find the first derivative using the product rule.

    .

    Factor out :

    .

    Step 2: Find the critical points.

    Since , set .

    Using the quadratic formula: .

    These are two distinct real roots, both simple (multiplicity 1).

    Step 3: Count sign changes.

    Since both roots are simple, changes sign at each root.

    Therefore, has exactly 2 local extrema.

    Answer: 2

    Question 3 · School Level Mathematics MSQ

    Let be a polynomial of odd degree and be a polynomial of even degree , both with real coefficients. Which of the following statements is ALWAYS true?

    1. A.

      The graphs of and must intersect in at least one point.

    2. B.

      If the leading coefficients of and are equal, the degree of is strictly less than .

    3. C.

      The equation can have exactly distinct real solutions.

    4. D.

      If , the graphs of and must intersect in at least one point.

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: The number of intersections is governed by the roots of the difference polynomial . The degree and parity of dictate whether it must have at least one real root.

    Step 1: Let . Since is odd and is even, . Therefore, the highest degree term in comes entirely from whichever polynomial has the larger degree. The leading terms cannot cancel each other out because they have different powers of .

    Step 2: This means the degree of is exactly . This immediately makes statement B FALSE, because the degree never drops regardless of the leading coefficients.

    Step 3: A polynomial of degree can have at most distinct real roots. Thus, can have at most roots. Statement C claims it can have roots, which is impossible. So C is FALSE.

    Step 4: If , then , which is even. An even degree polynomial can be strictly positive (e.g., ), meaning it might have 0 real roots. Thus, the graphs do not HAVE to intersect. Statement A is FALSE.

    Step 5: If , then , which is odd. A fundamental property of polynomials with real coefficients is that every odd-degree polynomial has at least one real root (its ends go to opposite infinities, so it must cross the x-axis by the Intermediate Value Theorem). Thus, has at least one real root, meaning the graphs MUST intersect in at least one point. Statement D is TRUE.

    Answer: D

    Question 4 · Probability Theory · 2019 SUB

    Suppose is a continuous distribution with probability density function

    where is the normalizing constant. Find the value of and the expected value of the distribution.

    Correct Answer:

    6.00

    Step-by-Step Solution

    Key idea: This is a normalization and expectation question for a continuous random variable with a quadratic density function. It is recognisable because the PDF is given up to a constant k, and both the normalizing constant and the expected value are requested.

    Step 1: Find the normalizing constant k.

    For any valid PDF f(x), the total area under the curve over its support must be 1:

    \int_0^1 f(x) dx = 1

    Substituting f(x) = k(x - x^2),

    \int_0^1 k(x - x^2) dx = k \int_0^1 (x - x^2) dx = 1

    Compute the integral:

    \int_0^1 (x - x^2) dx = [x^2/2 - x^3/3]_0^1 = 1/2 - 1/3 = 1/6

    So, k * (1/6) = 1 => k = 6.

    Step 2: Compute the expected value E[X].

    By definition, E[X] = \int_0^1 x f(x) dx = \int_0^1 x * 6(x - x^2) dx = 6 \int_0^1 (x^2 - x^3) dx

    = 6 [x^3/3 - x^4/4]_0^1 = 6(1/3 - 1/4) = 6(1/12) = 0.5.

    Since the NAT format requires a single numeric answer and k is the primary normalizing constant requested first, the answer is 6.00.

    Question 5 · Probability Theory · 2026 SUB

    Common Description:

    Question (6) and (7) are based on the following information

    A list is an arrangement of natural numbers in a random order, with all orderings equally likely. We say that a position is a new maximum if for all . For example, in the list

    positions 1,3,5 are new maxima. Note that position 1 is always a new maximum. Now answer the two questions below based on this information.

    For a given , determine the probability that position is a new maximum.

    Correct Answer:

    none

    Step-by-Step Solution

    Insight: This is a record probability question, recognisable because it asks for the probability that a specific position sets a new running maximum in a random permutation. The key is to isolate the first elements and use symmetry.

    Exam route:

    1. Focus only on the first elements .
    2. The event "position is a new maximum" means for all , which is exactly .
    3. By symmetry, the largest of these distinct values is equally likely to be at any of the positions.
    4. Therefore, the probability it lands at position is .

    Learning route:

    Step 1. The full permutation is drawn uniformly from all orderings of .

    Step 2. The condition depends only on the relative order of the first entries.

    Step 3. The set of values forms some -element subset of . Conditional on this subset, all relative orderings are equally likely.

    Step 4. Among the orderings, exactly place the largest value at position (the remaining values can be arranged freely in the first positions).

    Step 5. The probability is .

    Common trap: Answering . This mistake comes from confusing the running maximum with the global maximum. The question asks for the probability of beating the previous elements, not all elements.

    Verification: For , probability is (position 1 is always a record). For , probability is (position 2 is a record iff , which happens in half of all permutations). Both match intuition.

    Question 6 · Probability Theory · 2023 SUB
    Burger Paradise plans to expand to other cities and is considering opening a new branch in Coimbatore. They have identified three potential locations, and , and are evaluating the profitability of each location. Based on their research, they estimate that the fixed cost for opening a new location will be ₹50,00,000, ₹70,00,000 and ₹65,00,000 at and , respectively. They also estimate the variable cost per customer to be ₹85 and the average revenue per customer to be ₹150 at all three locations. They expect to serve 100,000, 150,000 and 130,000 customers in the first year at locations and , respectively
    Which location in Coimbatore is expected to be the most profitable in the first year of operation, and what is the expected profit at this location?
    Correct Answer:

    none

    Step-by-Step Solution

    Insight: Three locations share identical per-customer economics but differ in both fixed costs and expected volumes — the "lowest fixed cost wins" shortcut fails; you must compute full profit at each location's own expected volume.

    Exam route:

    .

    Profit for each.

    A: .

    B: .

    C: .

    Location B is the most profitable with an expected profit of ₹27,50,000.

    Learning route:

    This is a multi-alternative Cost-Volume-Profit comparison question, recognisable because three locations share identical per-customer economics (same selling price, same variable cost) but differ in both fixed costs and expected customer volumes. The key trigger is that expected volumes are different ( vs vs ), so we cannot use the "lowest fixed cost wins" shortcut — that shortcut only holds when expected volumes are identical across all alternatives.

    Step 1: Compute the shared Contribution Margin per customer.

    Since selling price and variable cost are the same at all three locations:

    Step 2: Apply the profit equation at each location's own expected volume.

    Location A (, ):

    Location B (, ):

    Location C (, ):

    Step 3: Compare and conclude.

    , so Location B yields the highest profit.

    Common trap: A student who applies the "lowest fixed cost wins" shortcut picks Location A (FC = ₹50,00,000) and reports ₹15,00,000. This is wrong because that shortcut requires identical expected volumes across all alternatives. Here, B's much higher volume (1,50,000 vs 1,00,000) more than compensates for its higher fixed cost.

    Verification: For Location B, total revenue . Total cost . Profit . ✓

    Answer: Location B is expected to be the most profitable, with an expected profit of ₹27,50,000.

    Question 7 · Discrete Mathematics · 2021 MSQ
    There are two longest subsequences, not necessarily contiguous, common to the strings “ARTIFICIAL” and “INTELLIGENCE”. They are “IIC” and “TIC” which are of length three.
    Consider two strings S1 = “CORONAVIRUS” and S2 = “SARSCOVID”. Let be the length of a longest common subsequence between S1 and S2 and let be the number of such longest common subsequences of length between S1 and S2. What is ?
    1. A.

      13

    2. B.

      15

    3. C.

      14

    4. D.

      16

    Correct Answer:

    ["C"]

    Step-by-Step Solution

    Key idea: Use dynamic programming to find the length of the Longest Common Subsequence (LCS), then backtrack to count the number of distinct LCS strings of that maximum length.

    Step 1: Identify the strings S1 = "CORONAVIRUS" and S2 = "SARSCOVID".

    Step 2: Eliminate characters that cannot be part of a long common subsequence. 'N', 'U', 'D' appear in only one string. 'S' appears at the very end of S1 but early in S2, meaning no characters can follow 'S' in both strings simultaneously. Thus, 'S' cannot be part of any LCS of length > 1.

    Step 3: The viable common characters are C, O, R, A, V, I. List their valid index pairs (i, j) where i is the index in S1 and j is the index in S2:

    • C: (0, 4)
    • O: (1, 5), (3, 5)
    • R: (2, 2), (8, 2)
    • A: (5, 1)
    • V: (6, 6)
    • I: (7, 7)

    Step 4: Find the longest sequence of strictly increasing pairs (both i and j must increase).

    Path 1: R(2, 2) O(3, 5) V(6, 6) I(7, 7) gives the string "ROVI".

    Path 2: C(0, 4) O(1, 5) V(6, 6) I(7, 7) gives the string "COVI".

    Path 3: C(0, 4) O(3, 5) V(6, 6) I(7, 7) also gives "COVI" (same string, different 'O' in S1).

    Step 5: The maximum length is . The distinct strings of this length are "ROVI" and "COVI", so .

    Step 6: Calculate .

    Answer: 14.

    Question 8 · Discrete Mathematics SUB

    In a class of 56 students, each student plays at least one of two games: Chess () or Carrom (). The number of students playing only Chess is twice the number playing only Carrom. If the number playing Chess exceeds the number playing Carrom by 8, how many students play only Carrom?

    Correct Answer:

    8

    Step-by-Step Solution

    Key idea: This is a 2-set problem with two constraints linking the exclusive regions, recognisable because "only Chess" and "only Carrom" are related by a ratio, and the set-size difference gives a second equation.

    Step 1: Define variables. Let Carrom only . Then Chess only (given). Let both .

    Step 2: Express set sizes.

    Given , so .

    Step 3: Use the total. Since everyone plays at least one:

    Step 4: Verify. Chess only , Carrom only , Both . Sum .

    , . Difference .

    Answer: 8

    Question 9 · Discrete Mathematics SUB

    Let and . How many surjective functions satisfy the condition ?

    Correct Answer:

    14

    Step-by-Step Solution

    Key idea: This is a constrained surjection counting problem. We fix one mapping and count the valid completions that ensure surjectivity.

    Step 1: Analyze the constraint.

    We are given .

    The remaining domain elements are .

    The codomain is .

    For to be surjective, the image of must be .

    Since is already in the image (via ), the remaining elements must map to such that the values and are covered. The value may or may not be hit again by .

    Step 2: Define the sub-problem.

    Let be the restriction of to .

    .

    Condition: .

    This implies .

    Note: It is NOT required that , because is already provided by .

    So, we need to count functions such that AND .

    Step 3: Use Inclusion-Exclusion.

    Total functions from to is .

    Let be the property that .

    Let be the property that .

    We want to exclude functions satisfying or .

    Number of functions where :

    The image is a subset of . There are such functions.

    Number of functions where :

    The image is a subset of . There are such functions.

    Number of functions where BOTH AND :

    The image is a subset of . There is such function (the constant function ).

    By Inclusion-Exclusion, the number of invalid functions (missing 2 or missing 3) is:

    .

    Step 4: Calculate valid functions.

    Valid functions = Total - Invalid

    Valid = .

    Wait, let me re-evaluate.

    Is it possible that I missed something?

    Let's list them manually to be sure for small numbers.

    Domain , Codomain . Must hit 2 and 3.

    Case 1: Image is exactly .

    Surjections from 3-set to 2-set .

    .

    Case 2: Image is exactly .

    Surjections from 3-set to 3-set.

    .

    Case 3: Image contains and possibly others?

    The codomain is only . So the image can be or .

    Are there other subsets containing 2 and 3? No.

    So total = (Surjections onto ) + (Surjections onto )?

    NO. This logic is slightly flawed because "Surjections onto " means the image is EXACTLY . "Surjections onto " means image is EXACTLY .

    These are disjoint cases.

    Let's check the Inclusion-Exclusion result again.

    IE calculated functions where Image(g) CONTAINS 2 and 3.

    This allows Image(g) to be OR .

    My manual sum: .

    My IE calculation: .

    So the answer is 12?

    Let me re-read the question carefully.

    surjective. . .

    Let's try another path.

    Total surjections from to is .

    By symmetry, does each element in appear as equally often?

    No, not necessarily.

    Let's count surjections where .

    Let be the number of surjections where .

    Sum .

    Due to symmetry of the codomain elements in the definition of surjection (before fixing ), .

    Therefore, .

    Why did I get 14 in the initial thought block? I made an arithmetic error in the scratchpad or misremembered a standard result.

    Let's double check the symmetry argument.

    The set of all surjections is invariant under permutation of the codomain labels.

    If we permute the codomain labels such that , the number of surjections mapping becomes the number of surjections mapping in the new labeling. Since the structure is identical, the counts must be equal.

    Total surjections = 36.

    There are 3 possible values for .

    Each value is equally likely among the set of all surjections.

    So count is .

    Let's re-verify the manual count.

    Restriction .

    Condition: and .

    Subcase A: . Then .

    Number of surjections from 3-set to 2-set is .

    Subcase B: . Then .

    Number of surjections from 3-set to 3-set is .

    Total = .

    The answer is definitely 12.

    Answer: 12

    Question 10 · Programming MSQ

    Consider the following pseudocode:

    ```

    function h(n):

    total = 0

    for i from 1 to n:

    total = 0

    for j from 1 to i:

    total = total + j

    return total

    ```

    Which of the following cannot be the output of h(n) for any positive integer n?

    1. A.

      1

    2. B.

      3

    3. C.

      6

    4. D.

      20

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: This is an accumulator reset question, recognisable because the variable total is set to 0 inside the outer loop. This means total is reset in every iteration, so only the last iteration matters.

    Step 1: Analyze the inner loop.

    In each iteration of the outer loop (for a given i), total is reset to 0, then:

    total = 1 + 2 + ... + i = i(i+1)/2

    This is the i-th triangular number.

    Step 2: Determine the final output.

    Since total is reset in every iteration, the final value is from the last iteration (i = n):

    h(n) = n(n+1)/2

    Step 3: Check which options are triangular numbers.

    • 1 = 1(2)/2 ✓ (n = 1)
    • 3 = 2(3)/2 ✓ (n = 2)
    • 6 = 3(4)/2 ✓ (n = 3)
    • 20: Is 20 a triangular number? Solve n(n+1)/2 = 20 → n² + n - 40 = 0.

    Discriminant = 1 + 160 = 161. √161 ≈ 12.69, not an integer.

    So 20 is not a triangular number.

    Answer: D

    Common trap: Not realizing total is reset, and thinking h(n) accumulates across iterations. If you think total accumulates, you might compute h(4) = 1 + 3 + 6 + 10 = 20, which is wrong. The correct h(4) = 10.

    Question 11 · Programming MSQ

    Consider the following three recursive functions defined for non-negative integers :

    ```python

    def f(n):

    if n == 0: return 1

    return f(n-1) + 2*n - 1

    def g(n):

    if n == 0: return 10

    if n % 4 == 0: return g(n-1) + 20

    return g(n-1) - 5

    def h(n):

    if n == 0: return 0

    return h(n-1) + 3*n

    ```

    Which of the following correctly ranks the values of , , and in increasing order?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a chapter-level estimation question that requires synthesizing closed-form mathematical equivalents for each sequence. The trap is ignoring the conditional branch in and assuming uniform linear growth.

    Step 1: Formulate . The function adds at each step, which is the sequence of odd numbers.

    .

    For : .

    Step 2: Formulate . The function adds 20 when is a multiple of 4, and subtracts 5 otherwise.

    Let be the number of multiples of 4 up to .

    .

    For : . .

    Step 3: Formulate . The function adds at each step, which is 3 times the sum of the first integers.

    .

    For : .

    Step 4: Compare the values: .

    Therefore, .

    Answer: A

    Question 12 · Programming MSQ

    Consider the correct algorithm for finding the second largest distinct element, which maintains two variables largest and second_largest, both initialized to . During a left-to-right scan of an array, the pair (largest, second_largest) transitions through a sequence of states. Which of the following state transitions is strictly impossible during the execution of this correct algorithm on any valid array?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    D

    Step-by-Step Solution

    Key idea: The correct algorithm enforces a strict invariant: when a new maximum is found, the old maximum is explicitly pushed down to become the new second_largest.

    Step 1: Analyze the update rules.

    • If : second_largest becomes the old largest, and largest becomes .
    • If : only second_largest is updated to .

    Step 2: Evaluate Option A. . Valid.

    Step 3: Evaluate Option B. . Valid.

    Step 4: Evaluate Option C. . Valid (since ).

    Step 5: Evaluate Option D. . This is valid. However, the next transition is .

    Step 6: Check the rule for reading 9. Since , the algorithm must execute: second_largest = largest (which is 8), then largest = 9. The resulting state must be , not .

    Answer: Option D describes an impossible state transition because it discards the old maximum instead of pushing it down.

    More CMI Data Science mock tests