COMPUTER PROGRAMMING FUNDAMENTALS
WHAT IS PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
#
|
|
%
|
|
//
|
|
!
|
Detailed explanation-1: -Comments in Python are identified with a hash symbol, #, and extend to the end of the line. Hash characters in a string are not considered comments, however. There are three ways to write a comment-as a separate line, beside the corresponding statement of code, or as a multi-line comment block.
Detailed explanation-2: -Comments in Python start with the # symbol. Here’s an example: #The code below prints Hello World! to the console print("Hello World!") In the code above, I have used a comment to explain what the code does.
Detailed explanation-3: -Single-line comments begin with two forward-slashes (//): // This is a comment.
Detailed explanation-4: -The single line comment is //. Everything from the // to the end of the line is a comment. To mark an entire region as a comment, use /* to start the comment and */ to end the comment. /** * Jims C code * * This is a block comment. * * This code does nothing.
Detailed explanation-5: -In Python, a hashmark, hash character, or hashtag (#) tells the interpreter to ignore the rest of the line of code. Indentation is the space at the beginning of each line of code. In Python, indentation indicates a new line of code. In other programming languages, it is used only for readability purposes.