-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathex2-dfunction.py
More file actions
18 lines (18 loc) · 1 KB
/
ex2-dfunction.py
File metadata and controls
18 lines (18 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def double(n):
return 2 * n #Return twice the given number
#Call the function with the value of your choice and print its result
print("To Call this function using its name and assign the value of your choice:\
You can run the Python interpreter in the directory where you use this Python file\
and then import the module by its name For ex: import simple_function1\
and then call the function inside module like simple_function1.double(5) Or else\
you can also assign the value obtained from this function to a new variable of\
your choice for ex: x=simple_function1.double(5), and then print the value of that variable")
#x = double(3)
#print(x)
print("The program ran successfully")
#------------------------------------------------------------------
print("first modification for 2nd commit")
print("Added this line from the Github website for the first time"
#----------------------------------------------------------
print("Added this line from user-2 account")
x = 100