-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
46 lines (31 loc) · 1.11 KB
/
Copy pathmain.py
File metadata and controls
46 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env python
"""main.py: comments in python"""
__author__ = "Njoh Noh Prince Junior"
__copyright__ = "Copyright 2022"
__credits__ = []
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = "Njoh Noh Prince Junior"
__email__ = "jufredprince@gmail.com"
# program starts here - igonore what is above
# 1. Generally comments look like this ✌ Single Line Comments
# print("This will never be printed. Will be ignored during execution.")
print("I will be printed!")
# 2. Block comments
# Hello this is just a random way of displaying very long descriptive
# message. This comment style is a block comment could be longer than
# this depending on what the situation might be.
# 3. Inline Comments
print("Yeah") # This piece of code prints Yeah
x = 8 # Initialize x with an arbitrary number
# 4. Using DocStrings
def function(num_one, num_two):
"""function(num_one, num_two) -> adds two numbers"""
return num_one + num_two
# 5. Multiple line DocStrings
def function(num_one, num_two):
""" function(num_one, num_two) -> adds two numbers
a: integer
b: integer
"""
return num_one + num_two