Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3- Write Python code using Regular Expression to validate the address base on the below requirements. Below is a correct Format of the Ethereum Blockchain

image text in transcribed

3- Write Python code using Regular Expression to validate the address base on the below requirements. Below is a correct Format of the Ethereum Blockchain Address: 1. An ETH address is an identifier containing 26-35 alphanumeric characters. 2. An ETH address starts with the numbers 1,3 , or eth1. 3. It contains digits in the range of 0 to 9 . 4. It allows uppercase as well as lowercase alphabet characters. 5. There is one exceptional point to be noted: The uppercase letter O, the uppercase letter I, the lowercase letter I, and the number 0 are not used to avoid visual ambiguity. 6. It should not contain whitespaces and other special characters. Sample Input and Output: Input: 1RAHUEYstWetqabcFn5Au4m4GFg7xJaNVN2 Output: True Input: 3.j98t1RHT73CNmQwertyyWrnqRhWNLy Output: True Input: b1qarsrrr7ASHy5643ydab9re59gtzzwfrah Output: False Explanation: Invalid ETH address as it starts with "b" Input: 0.j98t1RHT73CNmQwertyyWrnqRhWNLy Output: False Explanation: Invalid ETH address as it starts with 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss the purpose of an investment policy statement.

Answered: 1 week ago