Practice>pakistan >student>computer-science student Practice Questions

200 computer-science student Practice Questions

All2023202220212020201920182017201620152014201320122011201020092008200720062005200420032002200120001999199819971996199519941993199219911990

Question 1

What is the time complexity of quicksort in the average case?

Solution

The average case time complexity of quicksort is O(n log n).

Question 2

What is the capital of France?

Solution

The capital of France is Paris.

Question 3

What is Newton's second law of motion?

Solution

Newton's second law of motion states that Force = mass × acceleration (F = ma).

This means that the force acting on an object is directly proportional to the mass of the object and its acceleration.

Question 4

How do you calculate the area of a circle?

Solution

The area of a circle is given by the formula:

A = πr²

Where:

  • A is the area
  • r is the radius of the circle

Question 5

Solve for x in the equation 2x + 5 = 13.

Solution

Step 1: Subtract 5 from both sides:

2x + 5 - 5 = 13 - 5

2x = 8

Step 2: Divide both sides by 2:

2x/2 = 8/2

x = 4

Question 6

What is the process of photosynthesis?

Solution

Photosynthesis is the process by which plants convert light energy from the sun into chemical energy stored in glucose.

This process takes place primarily in the chloroplasts of plant cells.

The overall chemical equation for photosynthesis is:

6CO2 + 6H2O + light energy → C6H12O6 + 6O2

Here, carbon dioxide and water are used to produce glucose and oxygen.

Question 7

Solve for y in the equation 3y - 4 = 11.

Solution

Step 1: Add 4 to both sides:

3y - 4 + 4 = 11 + 4

3y = 15

Step 2: Divide by 3:

y = 15 / 3

y = 5

Question 8

Who wrote 'To Kill a Mockingbird'?

Solution

Harper Lee wrote 'To Kill a Mockingbird', which was first published in 1960. It is a novel set in the American South during the 1930s and deals with themes of racial injustice, moral growth, and compassion.

Question 9

What is the Pythagorean theorem?

Solution

The Pythagorean theorem states that in a right triangle, the square of the length of the hypotenuse (c) is equal to the sum of the squares of the other two sides (a and b):

a² + b² = c²

Question 10

What is the chemical symbol for gold?

Solution

The chemical symbol for gold is Au, which comes from the Latin word for gold, 'Aurum'.

Question 11

What is the formula for calculating speed?

Solution

Speed is calculated using the formula:

Speed = Distance / Time

Question 12

Solve for z in the equation 5z + 2 = 27.

Solution

Step 1: Subtract 2 from both sides:

5z + 2 - 2 = 27 - 2

5z = 25

Step 2: Divide by 5:

z = 5

Question 13

Who discovered penicillin?

Solution

Alexander Fleming discovered penicillin in 1928. Penicillin is a group of antibiotics that revolutionized the treatment of bacterial infections.

Question 14

What is the main ingredient in steel?

Solution

The main ingredient in steel is iron, but steel is made stronger and more resistant to corrosion by adding carbon and other elements like chromium and nickel.

Question 15

What is the capital of Japan?

Solution

The capital of Japan is Tokyo, one of the world's most populous and technologically advanced cities.

Question 16

What is the boiling point of water at sea level?

Solution

Water boils at 100°C or 212°F at sea level under normal atmospheric pressure (1 atm).

At higher altitudes, the boiling point of water decreases due to lower atmospheric pressure.

Question 17

Explain the water cycle.

Solution

The water cycle involves the continuous movement of water on, above, and below the surface of the Earth. The main stages are:

  • Evaporation: Water from oceans, lakes, and rivers turns into vapor.
  • Condensation: Water vapor rises, cools, and forms clouds.
  • Precipitation: Water falls back to Earth as rain, snow, or hail.
  • Collection: Water collects in bodies of water and the cycle begins again.

Question 18

What is the quadratic formula?

Solution

The quadratic formula is used to find the solutions of a quadratic equation. It is:

x = [-b ± √(b² - 4ac)] / 2a

Where a, b, and c are coefficients of the quadratic equation ax² + bx + c = 0.

Question 19

What is the chemical symbol for sodium?

Solution

The chemical symbol for sodium is Na, which comes from the Latin word 'Natrium'.

Question 20

What is the atomic number of carbon?

Solution

The atomic number of carbon is 6, which means a carbon atom has 6 protons in its nucleus.

Question 21

Who developed the theory of relativity?

Solution

Albert Einstein developed the theory of relativity, which revolutionized our understanding of space, time, and gravity. The theory includes:

  • Special relativity: Introduced the famous equation E = mc².
  • General relativity: Describes how gravity is a curvature of space-time.

© Copyright 2024, All Rights Reserved by AIForHomework

Version 0.1.0