1/5
## AI Tutor: Claude 3.5 We are going to start working with AI agents. Claude 3.5 is a great AI agent to get started with, but so is Chat GPT 4.0. Claude is especially helpful for beginners, but when things get more advanced it might break down. Let's start with a simple question for Claude: ```python What is this line representing in Vyper? ``` To tell Claude we are writing a code block, we enter three backticks, then hit Shift-Enter. Then, we paste our code: ```python nums: public(uint256[10]) ``` and press Enter. Claude tells us this line declares a public state variable called `nums`, and that it is an array of 10 unsigned integers. It also tells us that `public` means the array can be read externally and a getter function is automatically generated. Next, we ask Claude: ```python What even is an array? ``` Claude responds: An array is a data structure that stores multiple elements of the same type in a contiguous memory location. It allows you to: - Store multiple values under a single variable name - Access elements by their index (position) - Have a fixed or dynamic size depending on the programming language - Organize and efficiently manage collections of data Claude also gives us an example: ```python [10, 20, 30, 40, 50] ``` and explains that the first element is 10 and the third element is 30. We are going to ask Claude one more question: ```python Ok, what's an example of an array of 10 like in the Vyper above? ``` Claude gives us this example: ```python nums: public(uint256[10]) = [ 100, # index 0 200, # index 1 300, # index 2 400, # index 3 500, # index 4 600, # index 5 700, # index 6 800, # index 7 900, # index 8 1000 # index 9 ] ``` Claude explains that if we wanted to access the element in position 2 we would use `nums[2]` which would return 300. There are a lot of different AI agents out there, with different strengths and weaknesses. You can explore the ones that are free and see what you prefer. GitHub Copilot is another great one.
A comprehensive introduction to using Claude 3.5, an AI agent, as a coding tutor. This lesson covers asking questions, declaring public arrays in Vyper, and exploring the functionality of AI assistants.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
The basics of blockchain transactions, how to send and receive money on a blockchain network.
How to write Python based smart contracts using Vyper.
How to read and understand Vyper smart contracts.
Vyper data structures, arrays, structs, hash maps.
How to build a smart contract application and deploy on ZKsync with 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)
Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.
Last updated on March 21, 2025
Duration: 2h 08min
Duration: 2h 32min
Duration: 24min
Course Overview
About the course
The basics of blockchain transactions, how to send and receive money on a blockchain network.
How to write Python based smart contracts using Vyper.
How to read and understand Vyper smart contracts.
Vyper data structures, arrays, structs, hash maps.
How to build a smart contract application and deploy on ZKsync with 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)
Web3 engineer, educator, and Cyfrin co-founder. Patrick's smart contract development and security courses have helped hundreds of thousands of engineers kickstarting their careers into web3.
Last updated on March 21, 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