Computer Science: Programming with a Purpose Week 1 Quiz Answer

Computer Science Programming with a Purpose Week 1 Quiz Answer


Computer Science: Programming with a Purpose Week 1 Quiz Answer


In this article i am gone to share Coursera Course Computer Science: Programming with a Purpose Week 1 | Basic Programming Concepts Quiz Answer with you..


Basic Programming Concepts


Question 1)
Of the following, which best describes a variable?
  • A name that refers to a value
  • A name that refers to a literal
  • A statement that associates a value with a variable
  • A statement that associates a type with a value
  • A programming-language representation of a type
  • A programming-language representation of a value
  • A statement that associates a variable with a type
  • None of the above


Question 2)
True or false: In Java, it is necessary to declare the types of variables.
  • True
  • False


Question 3)
Which of the following expressions produce a value of type int? Mark all that apply.
  • 2+2
  • Integer.parseInt("2")
  • 7/3
  • 11 * (int) 0.25
  • 2 +2.0


Question 4)
What does this statement print?

System.out.println(5 + "bc");


  • 5bc








_________________________________________________________________________








Post a Comment

0 Comments