print ("Enter first number") f1 = input () print ("Enter second number") f2 = input () print ("Sum of these two numbers is", int(f1) + int(f2)) #Output of this program Enter first number 21 Enter second number 8 Sum of these two numbers is 29
General coding standards refers to how the developer writes code, so here we will discuss some essential standards regardless of the programming language being used. The following are some representative coding standards: Indentation: Proper and consistent indentation is essential in producing easy to read and maintainable programs. Indentation should be used to: Emphasize the body of a control structure such as a loop or a select statement. Emphasize the body of a conditional statement Emphasize a new scope block Inline comments: Inline comments analyze the functioning of the subroutine, or key aspects of the algorithm shall be frequently used. Rules for limiting the use of global: These rules file what types of data can be declared global and what cannot. Structured Programming: Structured (or Modular) Programming methods shall be used. "GOTO" statements shall not be used as they lead to "spaghetti" code, which is hard to read and maintain, except as out...
Every learning has some basic concepts that should be understood thoroughly. A person can be good at mathematics if the basic concepts are clear to study maths at higher levels, in English, one should be clear with English grammar so that they can speak, write and communicate very well in English. So, to move to a higher level, one should be clear with their basic level of knowledge. There are the following concepts in computer programming that should be clear for learning and hands-on in computer programming: We should know about the programming environment. The grammar of computer programming, known as Syntax. Role of data types, variables, and keywords in computer programming. Different types of loops and its role in computer programming What are input and output operations in computer programming Functions and its role Various types of logical and arithmetic operators. To become a good computer programme...
Comments
Post a Comment