Come up with the remaining loop , flow , and example on each one .
1.while loop
2.do while loop
3.infinite loop
The BNU1501 online class had 19 students that have joined online. The 4 students dropped out in the first hour of the class. The 9 students joined the class after 2hrs and 15 students dropped out after 2h30ms and 2 joined before the class ends. How many students were left by the time the class ends?
[1] 15
[2] 2
[3] 9
[4] 11
If 𝑥 is the number of pens you buy and 𝑦 is the price of each pen, write an equation expressing the total cost (𝑍) when buying pens.
[1] 𝑍 = (𝑥 + 𝑦)
[2] 𝑍 = 𝑥𝑦2
[3] 𝑍 = 𝑥𝑦
[4] 𝑍 = 𝑥 ÷ y
Which one of the following phrases represents the expression 5𝑛 − 4
[1] Four minus the product of five and a number. [2] Four less than five times a number. [3] The difference between four and five times a number. [4] The sum of five and a number decreased by four.
sum of powers:
you are given a list of integers L of size N.write a program to compute the value of SUM
SUM=x1pow1+x2pow2+x3pow3+---+xNpowN
where xi concatenated with powi is the i th element of the list L
and powj is a single digit number
i/p: the input contains space separated N integers
the o/p should be a single integer denoting SUM
L=[25]
o/p:x1=2 , pow1=5
SUM=2^5=32
i/p: 132 301
o/p:199
Evaluate:
sin 30⁰ cos 45⁰ − cos 30 ⁰ sin 45⁰
On your cousin’s wedding day you leave for the church 45.0 min before the ceremony is to begins, which should leave plenty of time since the church is only 30.0 km away.On the way, however, you have to make an unanticipated stop because of road construction work.As a result, your average speed for the first 15 min is only 10.0 km/h.
What average speed do you need to have on the remainder of the trip to get you to the church on time
Lombardo (2009) puts forward the view that the significant rise in the earth’s temperature over the past century is the product of increased levels of atmospheric CO2 caused by greater use of fossil fuels. He maintains that this position is now generally agreed, and that steps should be taken to reduce future warming by restricting the output of greenhouse gases such as carbon dioxide. However, Wong (2011) presents a range of counterarguments. She mentions evidence of historical climate change that cannot have been caused by rising levels of CO2, and also discusses the difficulty of obtaining reliable data on temperature changes, as well as other claims that solar activity may affect the amount of cloud cover and hence temperature levels. Such uncertainty, she considers raises doubts about the value of cutting CO2 production.
2.1 Which functional speech variety is used in the above text?
Which one of the following words are in alphabetic order
1. Orderly, ordinal, ordinance, ordinary, organ, organic,organism
2. Primacy, primary, primate, prime, primeval, primitive, primrose
3. Refined, refinery, reflect, reflex, reform, reformation, refract
4. Scenario, scenery, scenic, schedule, scheme, schematic
A manufacturer of flashlight batteries took a sample of 13 batteries from a day’s production and used them continuously until they failed to work. The life of the batteries in hours until failure is: 342, 426, 317, 545, 264, 451, 1049, 631, 512, 266, 492, 562, 298 . What would you advise if the manufacturer wanted to say in advertisement that these batteries last more than 400 hours?