Quiz5 - SlideShare [PDF]

Sep 14, 2016 - Incorrect. Refer to Section 5 Lesson 2. 5. Which of the following best describes a while loop? Mark for R

1 downloads 13 Views 423KB Size

Recommend Stories


Definisi kenyamanan - SlideShare [PDF]
Jan 8, 2015 - Definisi Kenyamanan Kolcaba (1992, dalam Potter & Perry, 2005) megungkapkan kenyamanan/rasa nyaman adalah suatu keadaan telah terpenuhinya kebutuhan dasar manu…

Holt.doc - SlideShare [PDF]
Jun 21, 2010 - ... Alternatives •Vocabulary Workshop Tests •Test Answer Keys Available upon request, one per teacher, year of purchase 0030573998/Media Literacy and Communication Skills, 106.92 122.96 VCR and First Course Monitor •Support and P

Maine explosion - SlideShare [PDF]
Dec 19, 2013 - Which do you think would have been the most reliable story? Why ... Document B: New York Times (Modified) MAINE'S HULL WILL DECIDE Divers Will Inspect the Ship's Hull to Find Out Whether the Explosion Was from the Outside or ... Now, f

myntra ppt - SlideShare [PDF]
Mar 12, 2013 - Capabilities Order Processing and Delivery: Myntra attempts to order and ship every order within 24 hrs.It offers free shipping within India on all products It can ship internationally to all major countries. Technological: Myntra

Teater Bangsawan - SlideShare [PDF]
Dec 3, 2011 - Pada masa itulah anak-anak bangsawan berjaya mengolah, membentukdan menentukan gaya teater dramatik bangsawan sebagaimana yang ..... Dengan adanya kemampuankumpulan untuk mengetengahkan pelakon handalan yang berbakat,dan denganpenggunaa

Bmi - SlideShare [PDF]
Aug 3, 2012 - BMIWhat is BMI?How do you use BMI?By Kathryn Kotula, R.D., M.S., M.P.H..

Recruitment And Selection - SlideShare [PDF]
Apr 2, 2010 - EXECUTIVE SUMMARY People form an integral part of the organization. The efficiency and ... Recruitment and selection form the process of hiring the employees. ... Determine the present and future requirement of the organization in conju

Recruitment And Selection - SlideShare [PDF]
Apr 2, 2010 - EXECUTIVE SUMMARY People form an integral part of the organization. The efficiency and ... Recruitment and selection form the process of hiring the employees. ... Determine the present and future requirement of the organization in conju

Historia GRUPO GEA - SlideShare [PDF]
Apr 1, 2011 - Online Course - LinkedIn Learning. Folleto historia admon. Claudia Espinosa. Cómo hacer una práctica de lectura. jcrojo. Ensayos de Historia Económica. jcrojo. La aparición de la gran empresa moderna. jcrojo. Continuación estrategi

Sd1ips ips riduwan - SlideShare [PDF]
Feb 2, 2011 - Gambar 3.3 keluargatuliskan contoh-contoh sikap kasih sayang ayahdan ibu kepada dirimu Ilmu P. 2. kasih sayang antar keluarga. ... dalam keluarga 1. ...... yosef beragama kristen gusti beragama hindu Gambar 4.4belajar bersama mereka sal

Idea Transcript


SlideShare Explore Search You

Upload Login Signup

Search

Submit Search

Home Explore Presentation Courses PowerPoint Courses by LinkedIn Learning Search Successfully reported this slideshow. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A loop that is executed repeatedly until the conditional statement is false. (*) A loop that contains a counter in parenth... numberOfEnemies = ( skillLevel >= 5) ? 5 : 10; numberOfEnemies = ( skillLevel > 5) ? 5 : 10; numberOfEnemies = ( skillLeve... 13. This keyword is used to instruct specific code when the input for a switch statement that does not match any of the ca... Upcoming SlideShare Loading in …5 × 1 of 4

Quiz5 1,969 views Share Like Download ...

Rifky A Ayub Follow Published on Sep 14, 2016

asd ... Published in: Business 0 Comments 0 Likes Statistics Notes

Full Name Comment goes here. 12 hours ago Delete Reply Block Are you sure you want to Yes No Your message goes here

Share your thoughts… Post Be the first to comment Be the first to like this No Downloads Views Total views 1,969 On SlideShare 0 From Embeds 0 Number of Embeds 1 Actions Shares 0 Downloads 7 Comments 0 Likes 0 Embeds 0 No embeds No notes for slide

Quiz5 1. 1. Quiz5 1.In a for loop, the counter is automatically incremented after each loop iteration. True or False? Mark for Review (1) Points True False (*) Correct 2. A counter used in a for loop cannot be initialized within the For loop statement. True or False? Mark for Review (1) Points True False (*) Incorrect. Refer to Section 5 Lesson 2. 3. What is one significant difference between a while loop and a do-while loop? Mark for Review (1) Points A DO-WHILE loop does not exist in Java and a WHILE loop does. A DO-WHILE loop will always execute the code at least once, even if the conditional statement for the WHILE is never true. A WHILE loop is only executed if the conditional statement is true. (*) A DO-WHILE loop includes an int that serves as a counter and a WHILE loop does not. There is no difference between a DO-WHILE loop and a WHILE loop. Correct 4. Why are loops useful? Mark for Review (1) Points They save programmers from having to rewrite code. They allow for repeating code a variable number of times. They allow for repeating code until a certain argument is met. All of the above. (*) Incorrect. Refer to Section 5 Lesson 2. 5. Which of the following best describes a while loop? Mark for Review (1) Points A loop that contains a segment of code that is executed before the conditional statement is tested. A loop that executes the code at least one time even if the conditional statement is false. 2. 2. A loop that is executed repeatedly until the conditional statement is false. (*) A loop that contains a counter in parenthesis with the conditional statement. Correct 6.How many times will the following loop be executed? What is the value of x after the loop has finished? What is the value of count after the loop has finished? int count = 17; int x = 1; while(count > x){ x*=3; count-=3; } Mark for Review (1) Points 5; 27; 8 3; 9; 11 5; 30; 5 3; 27; 8 (*) 4; 8; 27 Incorrect. Refer to Section 5 Lesson 2. 7. What is the function of the word "break" in Java? Mark for Review (1) Points It does not exist in Java. It exits the current loop or case statement. (*) It continues onto the next line of code. It stops the program from running. Incorrect. Refer to Section 5 Lesson 2. 8. How would you use the ternary operator to rewrite this if statement? if (skillLevel > 5) numberOfEnemies = 10; else numberOfEnemies = 5; Mark for Review (1) Points 3. 3. numberOfEnemies = ( skillLevel >= 5) ? 5 : 10; numberOfEnemies = ( skillLevel > 5) ? 5 : 10; numberOfEnemies = ( skillLevel < 5) ? 10 : 5; numberOfEnemies = ( skillLevel >= 5) ? 10 : 5; numberOfEnemies = ( skillLevel > 5) ? 10 : 5; (*) Incorrect. Refer to Section 5 Lesson 1. 9. In an if-else construct, the condition to be evaluated must be contained within parentheses. True or False? Mark for Review (1) Points True (*) False Incorrect. Refer to Section 5 Lesson 1. 10. The three logic operators in Java are: Mark for Review (1) Points &&, !=, = !=, =, == &, |, = &&, ||, ! (*) Correct 11.switch statements work on all input types including, but not limited to, int, char, and String. True or false? Mark for Review (1) Points True False (*) Correct 12. Which of the following could be a reason to use a switch statement in a Java program? Mark for Review (1) Points Because it terminates the current loop. Because it allows the user to enter an input in the console screen and prints out a message that the user input was successfully read in. Because it allows the code to be run through until a certain conditional statement is true. Because it allows the program to run certain segments of code and neglect to run others based on the input given. (*) Incorrect. Refer to Section 5 Lesson 1. 4. 4. 13. This keyword is used to instruct specific code when the input for a switch statement that does not match any of the cases. Mark for Review (1) Points switch case break default (*) None of the above Incorrect. Refer to Section 5 Lesson 1. 14. What is the difference between the symbols = and == ? Mark for Review (1) Points The symbol = is used in if statements and == is used in loops. The symbol == is used to assign values to variables and the = is used in declarations. The = is use to assign values to variables and the == compares values. (*) There is no difference. Incorrect. Refer to Section 5 Lesson 1. 15. Which of the following correctly matches the switch statement keyword to its function? Mark for Review (1) Points (Choose all correct answers) switch: identifies what element will be compared to the element of the case statements to find a possible match (*) switch: tells the compiler the value to compare the input against case: signals what code is executed if the user input matches the specified element (*) default: signals what code to execute if the input does not match any of the cases (*) if: records the user's input and sends it to the case statements to find a possible match Incorrect. Refer to Section 5 Lesson 1.

Recommended

Learning PowerPoint 2016 Online Course - LinkedIn Learning

Insights from a College Career Coach Online Course - LinkedIn Learning

100 Courses and Counting: David Rivers on Elearning Online Course - LinkedIn Learning

Quiz1 tonghop Daewoo Han

Pertemuan 09 (procedure dan function database) Rifky A Ayub

Pertemuan 10 (database client-server) Rifky A Ayub

T 12 (database internet) Rifky A Ayub

Bahasa inggris (buku guru) Rifky A Ayub

AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017 Carol Smith

The AI Rush Jean-Baptiste Dumont English Español Português Français Deutsch About Dev & API Blog Terms Privacy Copyright Support

LinkedIn Corporation © 2018 × Share Clipboard × Email

Enter email addresses Add a message From



Send Email sent successfully.. Facebook Twitter LinkedIn Link Public clipboards featuring this slide

×

No public clipboards found for this slide Select another clipboard ×

Looks like you’ve clipped this slide to already. Search for a clipboard Create a clipboard

You just clipped your first slide! Clipping is a handy way to collect important slides you want to go back to later. Now customize the name of a clipboard to store your clips. Name* Best of Slides



Description Add a brief description so others know what your Clipboard is about. Visibility Others can see my Clipboard Cancel Save Save this documentTap To Close

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.