AI / Google Antigravity Gemini Fundamentals Interview Questions
What is the Python `import antigravity` Easter egg and what does it demonstrate?
The import antigravity Easter egg is a hidden joke built into Python's standard library since Python 3. When executed, it opens a web browser pointing to the XKCD webcomic strip #353, which humorously depicts Python enabling flight by simply installing a library.
# Python Easter egg import antigravity # -> Opens https://xkcd.com/353/ in your default web browser # The antigravity module also contains a hidden geocode function: import antigravity print(dir(antigravity)) # Output: ['__builtins__', '__doc__', '__file__', '__loader__', # '__name__', '__package__', '__spec__', 'fly', 'geohash'] # The geohash function implements the xkcd geohashing algorithm: antigravity.geohash(37.421542, -122.085589, b"2005-05-26-10458.68") # Computes a Geohash based on date and Dow Jones opening price # The module's source code is a fun read: import inspect import antigravity print(inspect.getsource(antigravity))
| Easter egg | How to trigger | What it does |
|---|---|---|
| import antigravity | import antigravity | Opens XKCD #353 in browser; exposes geohash() |
| import this | import this | Prints the Zen of Python (PEP 20) |
| import __hello__ | import __hello__ | Prints 'Hello World!' |
| Barry's time machine | from __future__ import braces | Raises SyntaxError: not a chance |
Why interviewers ask about it: knowledge of import antigravity signals familiarity with Python's culture, the standard library's hidden features, and comfort with exploring the language beyond its functional use. The XKCD comic it references captures Python's philosophy of making powerful things easy to do.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
