Earn While Learning Web3 Programming>> Start Here FREE!!!
All discussion about our FREE Smart Contract Development With Solidity For Beginners Course goes here:
Do you have suggestions for improving the course, constructive criticism, additions and more to this course then reply below.
NOTE:
This Is An Exercise From Our FREE Smart Contract Development With Solidity For Beginners Course (If you have not enrolled yet, you can join the course totally for FREE).
@foskaay One of the differences between javascript and solidity is that javascript can run on web browser but solidity cannot
I will be available and expect more students responses over here
advance solidity courses coming this year - watchout all
1.What Is The Name Of Solidity Smart Contract Programming Used In This Course?
in the quiz .
the answer i chose is REMIX I WAS TOLD THAT THE ANSWER IS WRONG
@leouloko i will check to see what is wrong with the quiz and fix if need be. Thanks for notifying me
@leouloko this is now fixed.
For finding the bug and reporting it first, you just earned yourself Bug bounty of 1,000PFAQ.
Check the Earnings Page for your current balance.
CONGRATS!
Thank you very much sir I am very happy to be part of this sir
@leouloko indeed you are earlier and hope you stick around well enough to be part of the great things ahead on this platform. Meanwhile, help share your experience so far on your social media etc to make more programmers or programmers to-be discover our free helpful resources.
Also, follow our official Twitter dProgrammingUniversity handle to retweet our tweets as more info about the free courses will start getting pushed out from today on social media
contract howslidityiswriten{
function helloweb3world() public view returns(string memory){
if(4-6 == 4) {
return helloweb3world;
}
else {
return alechenu is now a developer;
}
}
}
please i hve been getting error please help
@leouloko try to always add the precise error you are getting so it easier to help out...
Meanwhile, just glanced through your code, I instantly spotted a serious error and have help rewrite the code below with explanation of the error i spotted personally. If that does not fix it then do let me know with precise error message along with the code
Your code
contract howslidityiswriten{
function helloweb3world() public view returns(string memory){if(4-6 == 4) {
return helloweb3world;
}
else {
return alechenu is now a developer;
}}
}
Rewriting for you below
.
contract howSolidityIsWriten{
function helloWeb3World() public pure returns(string memory){
if(4-6 == 4) {
return "Hello Web3 World" ;
}
else {
return "Alechenu is now a Developer" ;
}}
}
Try run above.
@leouloko now time to point out the errors.
The most glaring that will never allow the Smart Contract to compile nor deploy at all is the you forgot to add quote signs to the string.
Go back and rewatch the course video about intro to variable data types.
Whenever you declare a string it must be in a single or double quote and only number does not require quotes
Example:
string number = 1; //error
string number = "1"; //correct
string number = "one" ; //correct
uint number = "1"; //error
uint number = 1; //correct
int number = -1; //correct
Others is just make your code cleaner and readable by using camel cases etc....
my remix is saying spdx identifier not provided in source file. Before publishing consider adding a comment containing project removed link Sol.
this is the error i am getting
@leouloko simply ignore the spdx licensing error for now but if ready to go into production then you can use the license that fit your smart contract source code use case if it is open source like MIT or not
@leouloko Also for the screenshot you sent via live chat have you figured out the error already
I notice you have this line in the screenshot:
pragama solidity 0.8.7;
the error is typo error, it should be:
pragma solidity 0.8.7;
//the error was "a" before "m" in the pragma which you wrote as pragama
hope that helps
@leouloko you can use the following for the license for demo use only not for production contract:
Happy Holiday and hope you guys are taking advantage of the prelaunch discount to mint your Membership ID NFT?
Without it, you won't be able to access free courses on this platform again from 1st January 2022
If not check my recent mail in your inbox for how to mint at discount before the new year at dProgrammingUniversity.com
Optimistic Ethereum