This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/** | |
* @title ArrayOfStructs | |
* @dev A contract to manage an array of structs, with functions to add members, | |
* hash numbers, and directly access storage. | |
*/ | |
contract ArrayOfStructs { | |
struct Member { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original block reward for miners was 50 BTC | |
start_block_reward = 50 | |
# 210000 is around every 4 years with a 10 minute block interval | |
reward_interval = 210000 | |
def max_money(): | |
# 50 BTC = 50 0000 0000 Satoshis | |
current_reward = 50 * 10**8 | |
total = 0 | |
while current_reward > 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#To download all your programming assignments including all files and notebooks, follow these steps: | |
#1 - Go to the root tree folder for instance: https://hub.coursera-notebooks.org/user/${user_token}/tree/ | |
#2- Open the terminal by clicking the + button on the right-hand corner | |
#3 - Enter the following command in the terminal: | |
tar cvfz allassignments.tar.gz * | |
#4 - The previous command will create a zip named allassignments containing all your programmings assignment | |
#5 - Select allassignments.tar.gz and download | |
#6 - Enjoy, don't forget to delete it afterward ;-) |