Skip to main content

IS5103 WEEK-2 QUIZE'S


 WEEK-2


Q1. How many times will the following code print "Welcome to Java"?

int count = 0;

do {

System.out.println("Welcome to Java");

} while (count++ < 10);

A) 11

Q2. Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?

A) ((x < 100) && (x > 1)) || (x < 0)

Q3. In Java, the symbol "=" and the symbol "==" are used synonymously (interchangeably).

A) FALS

Q4. What is the output for y?


int y = 0;
for (int i = 0; i &lt; 10; ++i) {
y += i;
}
System.out.println(y);


A) 45

Q5. Assume that x and y are int variables with x = 5, y = 3, and a and d are char variables with a = 'a' and d = 'A', and examine the following conditions:

Condition 1: (x < y && x > 0)
Condition 2: (a != d || x != 5)
Condition 3: !(true && false)
Condition 4: (x > y || a == 'A' || d != 'A')

A) Conditions 2, 3 and 4 are all true, Condition 1 is not

Q6. The following loop is syntactically valid.

for (int j = 0; j < 1000; j++) j--;

A) TRUE

Q7. The statement if (a >= b) a++; else b--; will do the same thing as the statement if (a < b) b--; else a++;.

A) TRUE

Q8. The do loop differs from the while loop in that

A) the do loop will always execute the body of the loop at least once

Q9. An if statement may or may not have an else clause, but an else clause must be part of an if statement.

A) TRUE

Q10. Which of the following statements are true about Java loops?

A) all three loop statements are functionally equivalent














































Comments

Popular posts from this blog

GE5093 Design Thinking All Quizzes

  GE---5093-1D2-FA-2021 - Design Thinking Home My courses 2021-FA GE---5093-1D2-FA-2021 Week 1 Reading Quiz 1 Started on Sunday, October 31, 2021, 2:04 PM State Finished Completed on Sunday, October 31, 2021, 2:30 PM Time taken 25 mins 58 secs Grade 8.00  out of 10.00 ( 80 %) Top of Form Question  1 Correct 1.00 points out of 1.00 Flag question Question text A critical finding of Edward Lorenz related to Design Thinking was: Select one: a. An application of the caterpillar effect b. The idea of deterministic chaos or the "Butterfly Effect" c. Business leaders enjoy chaos d. Statistical modeling of weather was fairly accurate in the long term Feedback Your answer is correct. The correct answer is: The idea of deterministic chaos or the "Butterfly Effect" Question  2 Incorrect 0.00 point...

GE5103-2 Project Management [Aug 23 Syllabus]

    Some of the advantages of using time boxes and cycles in project coordination efforts include creating urgency, measuring progress, and allowing for predictable measurements. A)        True 2.    Even though most project managers are not contract specialists, they need to understand the process well enough to coordinate with the team. For the current assignment, you are looking at a short-term and small effort with a contractor of just a few hours without significant clarity. Which of the following would be the most applicable contract to use in this situation? A)        Time and materials 3. The project you are working on has had modifications to the plan from the start and even how the project is run. Project governance covers all of the 3 following except: A)        Naming The project manager 4. Of the following, which is most likely a trigger condition defined early in t...

IS-5113 Data Mining and Data Visualization [Jan 25 Syllabus]

  Lesson 1 Quiz One of the key differences between business analytics and data science is their primary focus either on business problems or on mathematical algorithms. True Analytics and analysis are essentially the same thing; they both focus on the granular level representation of complex problems through decomposition of the whole into its lower-level parts. False If a data scientist is analyzing historical data to identify problems and root causes, he/she is essentially conducting descriptive analytics. True ERP stands for enterprise resource planning and is used for the integration of company-wide data. True The most important driver behind business analytics popularity is the need for business managers to make experience and intuition driven business decisions. False Business analytics and data science have the same purpose: to convert data into actionable insight through an algorithm-based discovery process. True Major commercial business intelligence products and services...