This file contains 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-Lisence-Identifier: MIT | |
pragma solidity >=0.6.0 <0.9.0; | |
contract Learn{ | |
//uint Count; | |
// we added public and a =1 | |
uint public Count = 1; | |
// we can write the code to the uint256 above by calling it under contract |
This file contains 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; | |
contract HotelBook{ | |
enum status{ vacant, occupied} | |
status currentstatus; | |
address payable public owner; |
This file contains 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; | |
contract Lottery{ | |
//manager is in charge of the contract | |
address public manager; | |
//new player in the contract using array[] to unlimit number | |
address[] public players; |
This file contains 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.4.17; | |
contract Campaign{ | |
struct Request{ | |
string description; | |
uint value; | |
address recipient; | |
bool complete; |
This file contains 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.4.17; | |
contract Campaign{ | |
//class day 2 | |
struct Request{ | |
string description; | |
uint value; |
This file contains 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.4.17; | |
contract Campaign{ | |
//class day 2 | |
struct Request{ | |
string description; | |
uint value; |
This file contains 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
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads for the very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
This file contains 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
from datetime import datetime | |
def sample_responses(input_text): | |
user_message = str(input_text).lower() | |
if user_message in ("hello", "hi", "sup"): | |
return "Hey! Wh o goes you!!!" | |
if user_message in ("who are you", "can you help me", "who are you"): | |
return "I am a bot, how can i help you!!!" |
This file contains 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
from datetime import datetime | |
def sample_responses(input_text): | |
user_message = str(input_text).lower() | |
if user_message in ("hello", "hi", "sup"): | |
return "Hey! Wh o goes you!!!" | |
if user_message in ("who are you", "can you help me", "who are you"): | |
return "I am a bot, how can i help you!!!" |
This file contains 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
from datetime import datetime | |
def sample_responses(input_text): | |
user_message = str(input_text).lower() | |
if user_message in ("hello", "hi", "sup"): | |
return "Hey! Wh o goes you!!!" | |
if user_message in ("who are you", "can you help me", "who are you"): | |
return "I am a bot, how can i help you!!!" |
OlderNewer