-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathex2-dfunction.py
More file actions
21 lines (21 loc) · 1.05 KB
/
ex2-dfunction.py
File metadata and controls
21 lines (21 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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")
y = 200
print("Added this line from User-2 account")
B = 100
C = 200