Showing posts with the label solidity-interview-questions

Featured Post

How to Check Column Nulls and Replace: Pandas

Here is a post that shows how to count Nulls and replace them with the value you want in the Pandas Dataframe. We have explained the process in two steps - Counting and Replacing the Null values. Count null values (column-wise) in Pandas ## count null values column-wise null_counts = df.isnull(). sum() print(null_counts) ``` Output: ``` Column1    1 Column2    1 Column3    5 dtype: int64 ``` In the above code, we first create a sample Pandas DataFrame `df` with some null values. Then, we use the `isnull()` function to create a DataFrame of the same shape as `df`, where each element is a boolean value indicating whether that element is null or not. Finally, we use the `sum()` function to count the number of null values in each column of the resulting DataFrame. The output shows the count of null values column-wise. to count null values column-wise: ``` df.isnull().sum() ``` ##Code snippet to count null values row-wise: ``` df.isnull().sum(axis=1) ``` In the above code, `df` is the Panda

6 Top Solidity Interview Questions

Solidity is the prime language to write the logic for smart contracts in the Ethereum blockchain. These are selected interview questions refresh before you take an interview. Solidity Interview Questions on Solidity 1. What is Solidity? A) Solidity is the main language that you can use to write programs in Blockchain, such as smart contracts. 2. Where the Solidity programs run in Ethereum? A). Those will run in EVM. You can also call it an Ethereum Virtual Machine. 3. What kind of logic a Smart Contract can contain? A contract in the sense of Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain 4). Can the source code of smart contracts accessible to the outside world?  A). No, it is not possible to access the source code to the network. Also, there is limited access to one smart contract logic to the other smart contract logic. Eve, file systems, and other processes cannot access the source