Answer:
Hi!
The correct answer is d. Neither (a) nor (b) is true.
Explanation:
First, you have to know what the scripts intend to do, and they are counting from 1 to 10 in both cases.
Table of results of class TestA at end of each iteration:
[j = 0, counter = 1]
[j = 10, counter = 2]
[j = 20, counter = 3]
[j = 30, counter = 4]
[j = 40, counter = 5]
[j = 50, counter = 6]
[j = 60, counter = 7]
[j = 70, counter = 8]
[j = 80, counter = 9]
[j = 90, counter = 10]
Table of results of class TestB at end of each iteration:
[j = 10, counter = 1]
[j = 9, counter = 2]
[j = 8, counter = 3]
[j = 7, counter = 4]
[j = 6, counter = 5]
[j = 5, counter = 6]
[j = 4, counter = 7]
[j = 3, counter = 8]
[j = 2, counter = 9]
[j = 1, counter = 10]
That's why a) and b) are false.
Maybe you want to know why using pre increments on class TestB doesn't affect the loop. The reason is that when enters in a loop, first checks the test condition and takes the decision if true or false, and last executes the incrementation step.
Answer:
BEG
Explanation:
In traditional music theory, pitch classes are typically represented by first seven Latin alphabets (A,B,C,D,E ,F and G) . And in the below music notes attachment we can understand that the answer is option (a) BEG
Answer: (D) Database design follows the twelve principles proffered by Dr. Edgar F. Codd
Explanation:
The relational database is basically based on the relational model of the data which is proposed by the Dr Edger F. codd and he mainly introduced the twelve basics principle of the database designing in the database system. He also contributed various valuable principle in the computer science.
The twelve principle are:
- The first rule of the relational database is the information rule as it represented all data or information
- Independence of the integrity
- Viewing various updating rule
- Logically treatment of various NULL value
- Independence of the physical database
- Distribution in-dependency
- Various delete, insert and update rules
- The overall logical description of the database are basically stored in the database directory
- There is no subversion rule
- There is guarantee accessing rule
- Proper rule for data language
- The relational database level actions
def computeGrade(float grade, str a){
a = "A" if a > 0.9 else a = "B" if a > 0.8 else "C"
return a;
}
print(a)