Discuss rules for naming variables.

What will be an ideal response?


Answers will vary. Variable names must be one word. The name can contain letters, digits, hyphens, underscores, or any other characters you choose, with the exception of spaces. No programming language allows spaces within a variable name. Variable names should have some appropriate meaning. You might think you will remember how you intended to use a cryptic variable name within a program, but several months or years later when a program requires changes, you and your fellow programmers will appreciate clear, descriptive variable names. Some programmers have fun by naming variables after friends or creating puns with the names, but such behavior is unprofessional and marks those programmers as amateurs.

Computer Science & Information Technology

You might also like to view...

As a result of ____, data can be stolen or altered.

A. extrusion B. invasion C. intrusion D. port scanning

Computer Science & Information Technology

A picture cannot be rotated once it is inserted into the document

Indicate whether the statement is true or false

Computer Science & Information Technology

Match each class operation with its most likely category type.

A. ComputeArea( ); B. Displayview( ); C. SelectCamera( ); D. SoundAlarm( );

Computer Science & Information Technology

Which of the following words is a logical operator in Python??

A. ?NOT B. ?OR C. ?AND D. ?All of the above

Computer Science & Information Technology