Premium Essay

Rules of Programming Languages

In: Computers and Technology

Submitted By jemery712
Words 371
Pages 2
When dealing with the variable naming of Visual Basic, Python, and Java There are a few rules. When naming in Visual Basic, the name cannot exceed 255 characters in length. The name must contain a letter as the first character, and finally, the name cannot contain a; space, period, exclamation mark, dollar sign, or @, &, and # character in the name.
When naming in Python all the characters and the name must begin with a letter or underscore. No other characters can be used. Variable names are Case Sensitive, and certain words are reserved. These words cannot be used as a variable name because Python utilizes these words them for other commands. Some of these reserved words are: and, del, from, not, while, as, elif, global, or, with, assert, else, if, pass, yield, break, except, import, print, break, except, import,
 print, class, exec, in, raise, class, exec, raise, continue, finally, is, return, continue, finally, is, return, def, for, lambda and try.
Java also has variable language rules. First, a variable name must begin with a letter, underscore, or Unicode currency symbol, the initial character can be followed by any number of letters, numbers, underscore characters, and Unicode currency symbols. Also a variable name can’t contain spaces, and a query result is a type of variable, so it overwrites a local variable with the same name.
Each language has similarities regarding variable naming. None of the discussed programs allow spaces in the name. Each language contains certain characters that are not allowed in the naming scheme. None of the languages allow numbers in any of the names of the variables.
Regarding differences, Visual Basic has a maximum character length of 255 characters. Python has certain words that cannot be written in the variable name because they are reserved. Also, Java allows currency symbols whereas neither of the other...

Similar Documents

Premium Essay

Pt1420 Researching Variable Naming Rules

...successful programming language in the history of programming. In 1991, Microsoft built Visual Basic on the older BASIC language – Beginner’s All purpose Symbolic Instruction Code (Mabutt). In the late 1980s, Alan Cooper, owner of Tripod, developed drag-and-drop interface, Ruby, which was also an influence to the idea of Visual Basic (History of Visual Basics). Just like any spoken language, rules must be followed in order to create effective communication between two people. For programming languages, it is necessary to follow all naming rules in order to build the program. Visual Basic’s variable name rules are as follows: Up to 255 characters, names must begin with a letter, no embedded spaces or special characters are to be used besides the underscore “__”, there cannot be a reserved word, uppercase and lowercase should be used with a purpose, and names cannot be repeated with the same level of scope (Visual Basic Naming Rules). If a developer does not follow these rules when using Visual Basic, there will be errors that may occur even before the program can be tested. Python Python is another common programming language, and was influenced by the design of ABC (Lukaszewski). In the 1996, Guido van Rossum created his very own version of ABCs, which we all know now as Python (Lukaszewski). Python is a basic syntax used for statement grouping, a list, strings, and numbers (Lukaszewski). Because it is another programming language, it also has its very own rules. Some......

Words: 653 - Pages: 3

Premium Essay

Examples Of Imperative Programming

...# What is imperative programming? Imperative programming is a [paradigm](https://mortoray.com/topics/paradigms/) that explicitly tells the computer what to do and how to do it. Unlike most other approaches it is a relatively concrete view on data and execution -- there isn't much mystery or abstract runtime behavior involved. The essential aspects of imperative programming are sequenced instructions and mutable data. Imperative programming is the cornerstone of computing. CPUs primarily work as imperative execution engines, and compilers translate into this language. As the primary way of driving computers for most of our programming history, it's well represented in the language arena. > I'm not saying all of computing works this way. A...

Words: 1429 - Pages: 6

Free Essay

Programing Paradigm

...Programming paradigm is a fundamental style of computer programming , a way of building the structure and elements of computer programs. There are six main programming paradigms: 1. imperative programming, imperative programming, which is based on procedural languages, literate programming ,which structures programs as a human-centered web, as in a hypertext essay –documentation is integral to the program, and the program is structured following the logic of prose exposition, rather than compiler convenience. 2. declarative programming, declarative programming paradigms were developed. In these languages the computer is told what the problem is, not how to solve the problem – the program is structured as a collection of properties to find in the expected result, not as a procedure to follow. Given a database or a set of rules, the computer tries to find a solution matching all the desired properties. The archetypical example of a declarative language is the fourth generation language SQL, as well as the family of functional languages and logic programming 3. functional programming , Functional programming is a subset of declarative programming. Programs written using this paradigm use functions, blocks of code intended to behave like mathematical functions. Functional languages discourage changes in the value of variables through assignment , making a great deal of use of recursion instead. 4. object-oriented programming , object-oriented......

Words: 393 - Pages: 2

Free Essay

Management Lessons from Mayo Clinic

...PRINCIPLES OF PROGRAMMING LANGAUAGES Sub Code: IA Marks: Hrs/Week: 04 Exam Hours: 03 Total Hrs: 42 Exam Marks: 100 UNIT I 1. Introduction 4 Hrs Toward higher level languages, Programming paradigms, Language implementation: Bridging the gap, Expression notations, Abstract syntax trees. 2. Types : Data Representation 6 Hrs Elementary data types – Data objects, Variables and Constants, Data types, Declarations, Type checking and type conversion. Numeric data types, Enumerations, Booleans, characters. Structural data types- Structured data objects and data types, Specification of data structure types, Implementation of data structure types, Vectors and arrays, Records, Type equivalence. UNIT II 3. Imperative Programming 6 Hrs Basic statements, Structured sequence control, Handling special cases in loops, Programming with invariants, Proof rules for partial correctness. Procedure activations – simple call-return subprograms, Parameter passing methods, Scope rules for......

Words: 403 - Pages: 2

Free Essay

Student

...CONCEPTS OF PROGRAMMING LANGUAGES TENTH EDITION This page intentionally left blank CONCEPTS OF PROGRAMMING LANGUAGES TENTH EDITION R OB E RT W. S EB ES TA University of Colorado at Colorado Springs Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Vice President and Editorial Director, ECS: Marcia Horton Editor in Chief: Michael Hirsch Executive Editor: Matt Goldstein Editorial Assistant: Chelsea Kharakozova Vice President Marketing: Patrice Jones Marketing Manager: Yez Alayan Marketing Coordinator: Kathryn Ferranti Marketing Assistant: Emma Snider Vice President and Director of Production: Vince O’Brien Managing Editor: Jeff Holcomb Senior Production Project Manager: Marilyn Lloyd Manufacturing Manager: Nick Sklitsis Operations Specialist: Lisa McDowell Cover Designer: Anthony Gemmellaro Text Designer: Gillian Hall Cover Image: Mountain near Pisac, Peru; Photo by author Media Editor: Dan Sandin Full-Service Vendor: Laserwords Project Management: Gillian Hall Printer/Binder: Courier Westford Cover Printer: Lehigh-Phoenix Color This book was composed in InDesign. Basal font is Janson Text. Display font is ITC Franklin Gothic. Copyright © 2012, 2010, 2008, 2006, 2004 by Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved.......

Words: 142312 - Pages: 570

Premium Essay

Unit 2 Research Assignment

...Visual Basic is the first programming language with an exemplary number of variable naming rules. The msdn.microsoft.com article explains the rules well. To start a word you must use a letter of the alphabet as the first character. You cannot use a space, nor a period, nor an exclamation mark, or the special characters of @ (at), & (and), $ (dollar sign), # (pound key) in the name. The name cannot surpass 255 characters in total length either. Names have to be precisely identified if the variable name is the same as an already existing one. You cannot repeat names in the same scope without the name being a different variable type. Lastly, while Visual Basic is not case-sensitive, it keeps the capitalization in the statement where the name is defined. Python is the next programming language where it gives you slightly more freedom for a variable name. A name must begin with a letter, lowercase or uppercase or an underscore. Python is case sensitive as well, consistency is important for read-ability. The variable name can be any “reasonable” length according to w3resource.com. Lastly, there are some reserved words Python uses for other things, which yourself cannot use. Java is the last of the three programming languages and no surprising exception to the naming rules. Names are case-sensitive, while you can begin a variable name with the $ sign or _ symbol, it is highly discouraged. The docs.oracle.com documentation of Java variable names tells the reader to always......

Words: 541 - Pages: 3

Premium Essay

Unit 2 Research Assignment

...Unit 2 Research Assignment 1 Chris Stephens ITT Technical Institute PT1420 Introduction to Programming Mr. Chamberlin April 1, 2014 Researching Variable Naming Rules The variable naming rules for Visual Basic, Python, and Java have many different facets to them. These are the most common and most used programming languages in use today. Over the years these languages have become more user-friendly and easier to comprehend to write programs. Visual Basic is most used in introductory program writing and common for students’ first learning of programming. Some of the naming rules for Visual Basic are: the first character of the name must be a letter, you can’t use a space, period, exclamation point, or these special characters - &, @, $, or # in the name, the name cant’ exceed 255 characters in length, and Visual Basic isn't case-sensitive, but it preserves the capitalization in the statement where the name is declared. (Microsoft, 2014) Python provides a special process called the PEP process, short for Python Enhancement Process for changes proposed to Python. (University, 2014) Some of the naming rules for Python are as follows : indentation should be done using four spaces per indentation level, lines should be less than 80 characters as compared to Visual Basic and its use of a maximum of 255 characters, and lines that get too long should be aligned in a “reasonable” fashion, for example aligned with an open delimiter and at a......

Words: 625 - Pages: 3

Premium Essay

Principles of Programming

...is the difference between machine language and assembly language? Machine language is the computer programming language that can be used for direct programming of the machine whereas Assembly languages are used to create a program on computer and then assembler is user to convert the program into binary code of machine level code. 2. Why are there so many programming languages? Evolution: Computer science is a young discipline; we’re constantly finding better ways to do things. The late 1960s and early 1970s saw a revolution in “structured programming,” in which the go to-based control flow of languages like Fortran, Cobol, and Basic2 gave way to while loops, case statements, and similar higher-level constructs. .Special Purposes: Many languages were designed for a specific problem domain. The various Lisp dialects are good for manipulating symbolic data and complex data structures. . C is good for low-level systems programming. Each of these languages can be used successfully for a wider range of tasks, but the emphasis is clearly on the specialty. Personal Preference: Different people like different things. Some people find it natural to think recursively; others prefer iteration. Some people like to work with pointers; others prefer the implicit dereferencing of Lisp, Clu, Java, and ML. The strength and variety of personal preference make it unlikely that anyone will ever develop a universally acceptable programming language. Expressive Power: One......

Words: 917 - Pages: 4

Free Essay

Concepts of Programming Languages

...CONCEPTS OF PROGRAMMING LANGUAGES TENTH EDITION This page intentionally left blank CONCEPTS OF PROGRAMMING LANGUAGES TENTH EDITION R O B E RT W. S EB ES TA University of Colorado at Colorado Springs Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Vice President and Editorial Director, ECS: Marcia Horton Editor in Chief: Michael Hirsch Executive Editor: Matt Goldstein Editorial Assistant: Chelsea Kharakozova Vice President Marketing: Patrice Jones Marketing Manager: Yez Alayan Marketing Coordinator: Kathryn Ferranti Marketing Assistant: Emma Snider Vice President and Director of Production: Vince O’Brien Managing Editor: Jeff Holcomb Senior Production Project Manager: Marilyn Lloyd Manufacturing Manager: Nick Sklitsis Operations Specialist: Lisa McDowell Cover Designer: Anthony Gemmellaro Text Designer: Gillian Hall Cover Image: Mountain near Pisac, Peru; Photo by author Media Editor: Dan Sandin Full-Service Vendor: Laserwords Project Management: Gillian Hall Printer/Binder: Courier Westford Cover Printer: Lehigh-Phoenix Color This book was composed in InDesign. Basal font is Janson Text. Display font is ITC Franklin Gothic. Copyright © 2012, 2010, 2008, 2006, 2004 by Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United......

Words: 142253 - Pages: 570

Premium Essay

Organization of Programing Languages

...or CMP 401 ASSIGNMENT | ORGANIZATION OF PROGRAMMING LANGUAGES | | ANZOTSA JOHN ALAKU | BHU/12/04/05/0042 COMPUTER SCIENCE 400 LEVEL | | | ABRSTRACT My objective for these research was to find out about different programming languages and paradigm in which they belong, the most important use in this research are text and journal by other researchers. After all studies where carried out, I came to a conclusion that one programing language can belong to more than one paradigm C++ C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. Some people say that C++ is a middle language because it has the features of high level and low-level language. As one of the most popular programming languages in the world, C++ is widely used in the software industry. C++ is also used for hardware design to analyze structure. Some of its application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. AspectJ AspectJ is a general-purpose Aspect-Oriented extension to java programming language. It was created at Palo Alto Research Center Incorporated (PARC), now it is an open source project and part of the Eclipse Foundation. AspectJ has everything that Java has and more......

Words: 3773 - Pages: 16

Premium Essay

Research

...object-oriented, dynamically typed, reflective programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human–computer symbiosis."[1] It was designed and created in part for educational use, more so for constructionist learning, at the Learning Research Group (LRG) of Xerox PARC by Alan Kay, Dan Ingalls, Adele Goldberg, Ted Kaehler, Scott Wallace, and others during the 1970s. The language was first generally released as Smalltalk-80. Smalltalk-like languages are in continuing active development, and have gathered loyal communities of users around them. ANSI Smalltalk was ratified in 1998 and represents the standard version of Smalltalk. Compiler Description Language, or CDL, is a programming language based on affix grammars. It was designed for the development of compilers. It is very limited in its capabilities and control flow; and intentionally so. The benefits of these limitations are twofold. On the one hand they make possible the sophisticated data and control flow analysis used by the CDL2 optimizers resulting in extremely efficient code. The other benefit is that they foster a highly verbose naming convention. This in turn leads to programs that are to a great extent self-documenting. The original version, designed by Cornelis H. A. Koster at the University of Nijmegen emerged in 1971. Pascal is a historically influential imperative and procedural programming language, designed in 1968–1969 and......

Words: 2326 - Pages: 10

Premium Essay

Programming Midterm Study Guide Notes

...Programming Midterm Study Guide Programs that make a computer useful for everyday tasks are known as application software. System software – the programs that control and manage the basic operations of a computer. System software types: Operating system: most fundamental set of programs on a computer. Controls the internal operations of the computers hardware manage all of the devices connected to the computer, allows data to be saved to and retrieved from storage device, and allows other programs to run on the computer. Utility programs: performs a specialized task that enhances the computer’s operation or safeguard data. Examples are virus scanners, file compression programs, and data backup programs. Software Development tools: the programs that programmers use to create, modify, and tests software. Assemblers, compilers, and interpreters are examples. Interpreter is a program that both translates and executes the instructions in a high-level language program. The statements that a programmer writes in a high-level language are called source code or code. Syntax error is a mistake such as a misspelled key word, a missing punctuation character, or the incorrect use of an operator. NOTE: programs that are compiled generally execute faster than programs that are interpreted because a compiled program is already translated entirely to machine language when it is executed. A program that is interpreted must be translated at the time it is......

Words: 1662 - Pages: 7

Free Essay

Paper

...PART II: Programming paradigms: procedural, object-oriented, functional, and declarateive This paper is going to briefly discuss programming paradigms: procedural, object-oriented, functional, and declarative. Programming paradigms are ways in which a computer communicates. A programming paradigm is divided into four different languages. The first language is the procedural language. Procedural language is defined as a paradigm in which a program acts on passive objects using procedures. When procedural language is used, the program consists of nothing but a lot of procedure calls. Under the procedural language there are specific languages in which computers fall under. FORTRAN (FORmula TRANslation), COBOL (Common Buisness-Oriented Language), Pascal, C,and Ada. FORTRON was designed by IBM engineers in 1957 and it was the first known high-level language. FORTRAN had high-precision arithmetic, capability of handling complex numbers, and also exponentiation computation (Knox, 2013). COBOL was designed by computer scientists (Forouzan, and Mosharaf, 2008).   COBOL had hast access to files and databases, updated of files and databases, large amounts of generated reports, and user-friendly formatted output. Pascal was invented in 1971 and was designed to teach programming to novices by emphasizing the structured programming approach (Forouzan, and Mosharaf, 2008). The C language was developed in the early 1970s and it had high-level instructions that hides hardware......

Words: 551 - Pages: 3

Premium Essay

Robot

...CPSC 202 – (Programming?) Assignment #1 The Wandering Robot All too often we get caught up in the details of programming, without first appreciating the simple idea of breaking a problem down into steps, which is the essence of programming. So here is a programming assignment without any of the details - No computer languages  No computer jargon  No variables  No computer! You will be working in groups. We will choose a playing surface on campus. Each group will attempt to "program a robot" to find its way from a start point on the playing surface to an end point on the playing surface, while avoid obstacles which may be in the way. The number or arrangement of obstacles will not be known ahead of time. Nor will the boundaries of the playing surface. The "robot" will be your instructor -- so you cannot expect it to interpret vague instructions to your advantage. Be as specific as possible, so as to leave no room for interpretation. The "program" will be a list of rules. Each rule consists of two parts: 1. 2. An IF part containing any question about the situation which can be answered with a yes or no, including questions about the start point, the finish point, obstacles, the boundary, or past actions. A THEN part which contains one or more of the following actions: STEP TURN LEFT DEGREES TURN RIGHT DEGREES The only way to repeat an action is to set it up so that it will be done on the next trip through the rule set. As soon as a rule "fires"......

Words: 623 - Pages: 3

Free Essay

Quiz 1 C++

...computer (Machine Language) Incorrectly spelled words or reversing the proper order of two words in a computer program (Syntax Error) Pictorial representation of the logical steps it takes to solve a problem (Flowchart) English-like representation of the logical steps it takes to solve a problem (Pseudocode) Used to show the correct sequence of statements (Flowlines) Preselected value that stops the execution of a program (Sentinel) Question 2 When you write a program that will run in a GUI environment, as opposed to a command-line environment, _____ some syntax is different Question 3 Which of the following is an example of a syntax error? misspelling a programming language word Question 4 Which of the following pairs of steps in the programming process is in the correct order? code the program, translate it into machine language Question 5 The major computer operations include _____. input, processing, and output Question 6 When instructions are carried out, a program runs, or ____________________. executes Question 7 The programmer’s most important task before planning the logic of a program is to _____. understand the problem Question 8 The two most commonly used tools for planning a program’s logic are _____. flowcharts and pseudocode Question 9 An English-like programming language such as Java or Visual Basic is a _____ programming language. high-level Question 10 The heart of the programming process lies in......

Words: 492 - Pages: 2