anonymous
  • anonymous
Hi fellow OCW student, I have a question about ps3b.py homework; writing hangman code computer part. from ps3a import * import time from perm import * what is importing other codes mean? are all the functions from the imported codes allowed to use ?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
*correction-a word game, not hangman.
anonymous
  • anonymous
yep, the objects from those modules will be available in the local namespace.
rsmith6559
  • rsmith6559
The import statement imports ( brings in to ) other modules and libraries into your program. The two types of import statement that you have import things differently. import time imports the time module into your program, but in it's own namespace. To get the localtime, you have to call time's functions with time as the namespace: time.localtime( time.time() ) from perm import * imports all ( * ) of perm's functions into the local namespace. To use one of perm's functions or objects, you don't have to preface it with perm. Some other languages like C #include instead of import their libraries. Usage wise, it's basically the same.

Looking for something else?

Not the answer you are looking for? Search for more explanations.