0% found this document useful (0 votes)
97 views6 pages

Module 1 Quiz PDF

This quiz has been regraded, affecting the student's original score of 11.5 out of 15. The regraded score is now 12 out of 15. The quiz consisted of 15 multiple choice questions covering Java programming concepts like variables, data types, operators, and input/output. It was available for over 3 months and students were allowed two attempts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views6 pages

Module 1 Quiz PDF

This quiz has been regraded, affecting the student's original score of 11.5 out of 15. The regraded score is now 12 out of 15. The quiz consisted of 15 multiple choice questions covering Java programming concepts like variables, data types, operators, and input/output. It was available for over 3 months and students were allowed two attempts.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

This quiz has been regraded; your score was affected.

Module 1 Quiz
Due
Sep 22 at 11:59pm
Points
15
Questions
15
Available
Sep 21 at 12am - Dec 9 at 11:59pm
3 months
Time Limit
None
Allowed Attempts
2

Take the Quiz Again

Attempt History
Attempt Time Score Regraded
LATEST Attempt 1
41 minutes 11.5 out of 15 12 out of 15

Score for this attempt:


12 out of 15
Submitted Sep 22 at 1:08pm
This attempt took 41 minutes.

Question 1 1
/ 1 pts

Instead of saying “I give up” which of the following should you say to practice using growth mindset?

 
I can’t make this any better

 
This is too hard

 
I just can’t do programming

Correct!  
I’ll use a different learning strategy.

 
None of the above

Question 2 1
/ 1 pts

Which print command will print a new line after the provided value is printed out?

 
Sys.println();

 
System.out.print();

Correct!  
System.out.println();

 
Os.println()

 
Main.out.print();

 
Nextline.print()

Question 3 1
/ 1 pts

What will the following print out?


 

> System.out.println("She bought " + 27 + 13 + " lemons");

 
She bought 40 lemons

 
She bought 27 + 13 lemons

Correct!  
She bought 2713 lemons

 
She bought lemons

Question 4 1
/ 1 pts

What will the following print out?

> System.out.println("She bought " + (27 + 13) + " lemons");

Correct!  
She bought 40 lemons

 
She bought 27 + 13 lemons

 
She bought 2713 lemons

 
She bought (2713) lemons

 
She bought lemons

 
None of the above

Question 5 1
/ 1 pts

Which line has a syntax error in the following code snippet?

Line1: public class Main

Line2: {

Line3: public static void main(String[]args)

Line4:   {

Line5: System.out.println("She bought " + 

Line6:      (27 + 13) + " lemons");

Line7:      System.out.println(“She has no money”)

Line8: }

Line9:}

 
Line 5

 
Line 6

Correct!  
Line 7

 
Line 8

 
Line 9

Question 6 0
/ 1 pts

Select the words which can not be used as variable names in Java?(Multiple answers possible)

Correct Answer  
static

You Answered  
dynamic

 
section

Correct Answer  
class

You Answered  
of

Correct Answer  
for

Question 7 1
/ 1 pts

You need to keep track of the number of customers that an online store has each day. What type of variable is appropriate?

Correct!  
int

 
double

 
float

 
boolean

 
String

 
char

Question 8 0
/ 1 pts

All of the following are valid Java variable names.

Average_daily_temp

average$daily$temp

Average_Daily_Temp

averagedailytemp

avrageDailyTemp
Correct Answer  
True

You Answered  
False

Question 9 1
/ 1 pts

Which of the following is the conventional way to name a Java variable.

 
Average_daily_temp

 
average-daily-temp

 
Average_Daily_Temp

Correct!  
averageDailyTemp

 
Averagedailytemp

Question 10 Original Score:


0.5
/ 1 pts
Regraded Score:
1
/ 1 pts


This question has been regraded.

You need to keep track of whether or not a software user has logged in to the system. Which types can possibly be used?  
(There may be multiple correct responses.)

Correct Answer  
int

Correct Answer  
double

Correct Answer  
float

Correct!  
boolean

Correct Answer  
String

Correct Answer  
char

Question 11 1
/ 1 pts

What is the result of this operation in Java:

> 9 / 4

 
2.30

 
2.25

 
2.20

Correct!  
2

 
Error

Question 12 0
/ 1 pts

What is the output of the following code snippet?

int a = 3;

int b = 8;

System.out.println(a%b);

Correct Answer  
3

 
8

 
2

You Answered  
0

 
None of the above

Question 13 1
/ 1 pts

What is printed when the code segment is executed?:

int a = 5;

int b = 2;

double c = 3.0;

System.out.println(5 + a / b * c - 1);

 
0.66666666667

 
9.0

Correct!  
10.0

 
11.5

 
14.0

Question 14 1
/ 1 pts

Line1: int a;

Line2: int b = 2;

Line 1 and Line 2 are the examples of variable _____ and ____ respectively.

 
initialization, declaration

Correct!  
declaration, initialization

 
constraint, indexing

 
initialization, assignment

 
None of the above

Question 15 1
/ 1 pts

Scanner scan = new Scanner(System.in);

String name = scan.nextLine();

The Scanner class is used to get user _____.

 
output

 
value

Correct!  
input

 
profile

 
status

Quiz Score:
12 out of 15

You might also like