In Python, you can use the as keyword to create an alias for a long package path or module name. This allows you to use a shorter name in your code while still referencing the original package or module.
The Answer is 'D'. You can alias it using the 'as' keyword. B would be wrong, since it does not address the fact that you have to repeat the entire long path when you try to invoke a function from this package. SO just doing it once to alias makes it easy.
I vote B on this, as D allows aliasing the package name, but does not address the fact you still have to write the long path. The path is not used during package invocation in any case, so to me the most accurate (though still terrible) answer is B
This is a confusing question, as in the import, the package would be used as only "Zeta" which doesn't include the path, so using the "as" to alias doesn't address what it asks (which is to circumvent having a long path)
Isn't D the correct answer? Ex: We use import numpy as np
I am confused now.. Also, please let me know if you have given the exam PCAP-31-03 and if these questions came in it. Thanks!
right answer is D. 'as' is the keyword for an alias.
upvoted 3 times
...
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
tanst
Highly Voted 3 years, 1 month agoTheFivePips
Most Recent 11 months, 3 weeks agoEllo2023
1 year, 5 months agoSonuSojan
1 year, 5 months agobaimus
1 year, 7 months agobaimus
1 year, 7 months agomacxsz
2 years, 7 months agoAlvienzo
3 years, 3 months agosj_95
3 years, 3 months agoMarleenP
3 years, 1 month ago