MyProgrammingLab_2.3VariablesAndLiterals

MyProgrammingLab_2.3VariablesAndLiterals - My Programming...

This preview shows page 1 - 3 out of 4 pages.

My Programming Lab Chapter 2.3 Variables and Literals QUESTION 1: Correct 60122 - Before a variable is used it must be Answer: defined declared * imported evaluated assigned 20519 - Write a literal representing the integer value zero. Answer: 0 60106 - Which of the following is NOT a legal identifier? outrageouslyAndShockinglyLongRunon _42 _ lovePotionNumber9 7thheaven * 60108 - Which of the following IS a legal identifier? 5_And_10 Five_&_Ten ____________ * LovePotion#9 "Hello World" 60110 - Which is the best identifier for a variable to represent the amount of money your boss pays you each month? Answer: notEnough wages paymentAmount monthlyPay * money 85016 – QUESTION 1: Of the following variable names, which is the best one for keeping track of whether a patient has a fever or not? Answer: temperature feverTest
Image of page 1
hasFever * fever QUESTION 2: Of the following variable names, which is the best one for keeping track of whether an integer might be prime or not? divisible isPrime mightBePrime * number 20524 - Declare an integer variable named degreesCelsius.
Image of page 2

Want to read all 4 pages?

Image of page 3

Want to read all 4 pages?

You've reached the end of your free preview.

Want to read all 4 pages?

  • Fall '13
  • English-language films, Following, Newline, standard output

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern