Question
In a program that manages a collection of `Employee`
objects, each with a `salary` attribute, which control flow mechanism would be most efficient to find all employees whose salary is above a certain threshold?ÂSolution
This is the most straightforward and efficient way to filter elements in a collection based on a condition. Iterating and applying a conditional check (`if`) allows you to select only the desired elements.
The curved surface area of a cylindrical roller is 792 cm². If its height is 18 cm, find the diameter of the roller.
The ratio of length to breadth of a rectangle is 5:4, respectively. Perimeter of rectangle is 252 cm. If each side of a square is 25% more than the brea...
A cuboid has length 6 cm, breadth 5 cm and height 4 cm. What is its volume?
An army of 2100 men has provision for 50 days. After 10 days due to injuries some of them left and the food were now enough for next 50 days for remaini...
The radius of the base of a cylinder is 14 cm and its curved surface area is 880 cm². Its volume (in cm³) is: (Takе π = 22/7)
The areas of three adjacent faces of a cuboid are 32 cm2,24cm2 and 48cm2.Find the volume of cuboid.(in cm cube)
A solid cube of side 8 cm is dropped into a rectangular container of length 16 cm, breadth 8 cm and height 15 cm which is partly filled with water. If t...
The ratio of length to breadth of a rectangle is 5:4, respectively. Perimeter of rectangle is 288 cm. If each side of a square is 25% more than the brea...
Find the area (in cm2) of the scalene triangle whose sides are 5 cm, 9 cm and 8 cm.
A cone has a height of 28 cm. A sphere is melted to form this cone. If the radius of the sphere is 7 cm, find the radius of the base of the cone.