Computers and Technology

Question 1
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following statements contains an error?

string lotteryfrontpair = lotterynum. substring(0, 1);
string lotterybackpair = lotterynum. substring(2);
string userbackpair = userpick. substring(1, 2);

a) i only
b) ii only
c) iii only
d) i and ii only
e) i, ii, and iii

question 2
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following statements contains an error?

for(int n = 1; n < = lotnumlength; n++)
for(int n = 0; n < = lotnumlength; n++)
for(int n = 0; n < lotnumlength; n++)
a) i only
b) ii only
c) iii only
d) i and ii only
e) i and iii only

question 3
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following statements contains an error?

else if( userbackpair. equals(lotterybackpair) )
else if( ! userfrontpair. equals(lotteryfrontpair) )
else if( userpick == lotterynum )
a) i only
b) ii only
c) iii only
d) i and ii only
e) ii and iii only

question 4
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following statements contains an error?

int digit = (int) (math. random() * 9);
lotterynum += digit;
//system. out. println(lotterynum);
a) i only
b) ii only
c) iii only
d) i and iii only
e) ii and iii only

question 5
errors can be syntax errors or logic errors (the code works, but not as intended).

which of the following statements contains an error?

if(userpick. equals(lotterynum))
if(userfrontpair. equals(lotteryfrontpair))
if(userbackpair. compareto(lotterybackpair) < 0)

a) i only
b) ii only
c) iii only
d) i and ii only
e) ii and iii only

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 07:30, devnnn44
What is the original authority for copyright laws
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, jhitotw
What is the primary difference between the header section of a document and the body? a. the body is displayed on the webpage and the header is not. b. the header is displayed on the webpage and the body is not. c. the tag for the body is self-closing, but the tags for the headers must be closed. d. the tag for the header is self closing, but the tag for the body must be closed.
Answers: 3
image
Computers and Technology, 23.06.2019 19:00, amayax77
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
Answers: 1
image
Computers and Technology, 24.06.2019 07:30, isabelgalvarado2838
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
Answers: 2
Do you know the correct answer?
Question 1
errors can be syntax errors or logic errors (the code works, but not as intended).<...

Questions in other subjects:

Konu
Chemistry, 01.02.2021 23:00
Konu
Social Studies, 01.02.2021 23:00