#python #tutorial #course
00:00:00 intro
00:00:19 help("modules")
00:01:01 import x
00:01:28 import x as y
00:01:55 from x import y
00:02:17 example
00:03:51 create a module
00:06:11 conclusion
--------- main.py ---------
import example
result = example.pi
result = example.square(3)
result = example.cube(3)
result = example.circumference(3)
result = example.area(3)
print(result)
--------- example.py ---------
pi = 3.14159
def square(x):
return x ** 2
def cube(x):
return x ** 3
def circumference(radius):
return 2 * pi * radius
def area(radius):
return pi * radius ** 2
On this page of the site you can watch the video online What are Python modules? 📨 with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 05 December 2022, share the link with friends and acquaintances, this video has already been watched 136,257 times on youtube and it was liked by 3.8 thousand viewers. Enjoy your viewing!