1/5
## Google's AI (Gemini) We're going to learn how to use Google Colab, and the AI features it provides, such as Google Gemini. What is really nice about Google Colab, is that if we don't understand something, we can use the AI features. We can hit "Gemini" here and be sure to read the privacy notice. Then, we can continue. We can enter different prompts here. We could even copy all the code here if we don't understand what's going on, go into Gemini, and write our little prompt. ``` What does this code do? ``` We'll put three backticks, a new line with shift enter, paste it in, shift enter again, three more backticks. This is typically how you notate that something is code. We put three backticks, put all the code, and three more backticks. So what does this code do? We'll zoom out a little bit. We'll hit enter, and Gemini will start thinking. Okay, let's break this down. This line is a comment. Comments in Python start with the hashtag symbol. They are ignored by the Python interpreter and are intended for humans to read. This comment is simply saying "Hi, I'm a comment!" ```python print("Hi!") ``` This line is a function call to the built-in print() function. This function takes one or more arguments and displays them to the console. In this case, it is printing the string "Hi!" to the console. And then another comment. It even gives you some sources for where it learned how to understand what this is doing. It did a little bit of Googling itself on the backend. So as you're coding, as you're learning, feel free to use different AI features to help expedite your learning process. We'll close this, and we'll delete everything in here, and start with the next section. If you want to practice using some generative code, you can click "Generate" here. And you could type something as simple as "Write a print statement" to print out the word "hi". Hit enter, and it'll give you exactly kind of the code that you want here. ```python print("Hi!") ``` It's important though, that you do understand what this code is actually doing so that when AI gets it wrong, you can actually correct it. We'll close this, and we'll delete everything in here, and start with the next section. If you want to save this locally for later, you can hit file, download. Then you can download this as a .pynb or .py file, free to have it locally if you want to study offline as well. We'll go ahead and create a new cell or a new block of code by scrolling down. We'll click the + Code button here. We'll get a new cell.
A powerful introduction to Google Colab's Gemini AI. This lesson shows how to use Gemini to analyze code, understand it, and even generate new code snippets to expedite the learning process.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on January 14, 2025
Duration: 2h 20min
Duration: 1h 51min
Duration: 58min
Duration: 2h 23min
Duration: 53min
Duration: 2h 24min
Duration: 28min
Duration: 1h 54min
Duration: 11min
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on January 14, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar