Ask coding questions

← Back to all posts
How to use packages
Cooolcoder

I don't know how to use packages? What are there and how do I use one? Is the code inside done for me or do I have to make it myself? Are there any languages that can't support packages? How do packages help people to code easier?

Answered by Squirrel777 [earned 5 cycles]
View Answer
Voters
Cooolcoder
Comments
hotnewtop
Squirrel777

So packages are libraries! Like you asked:
How do packages help people to code easier?
They help people by making code easier! Its hard to explain but say I want to have a random number generator coded in Python. I have no idea how to generate a random number but the random package for python takes care of that! You can install a package like this:

There you have installed your first package! Now, how do I use it??
Well, here is an example:

I hope this helps!

And to answer your other questions:
Is the code inside done for me or do I have to make it myself?
Yes it is! All you have to do is install it!

Are there any languages that can't support packages?
Most languages like Javascript or Python support packages!

Cooolcoder

@Squirrel777 thanks! that helped

Squirrel777

@Cooolcoder No problem! If you have any more questions feel free to ask me!

Cooolcoder

@Squirrel777 Thanks! sure

RYANTADIPARTHI

hi @Cooolcoder can you check out my newest post? It's in the share hot section. Thanks!