Stuck on Idea Silver badge Maker Activation
Watch this threadPage 1 of 1
Skip to page:
Diamonddolphin26
Badges:
7
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
I'm stuck on the Idea Silver badge on the first functions. This is what I typed down:
initiate();
function lifeSupportCheck() {
initiate();
}
Where have I gone wrong?
initiate();
function lifeSupportCheck() {
initiate();
}
Where have I gone wrong?
0
reply
Igotanidea
Badges:
5
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
Report
#2
It's ridiculous how unhelpful the course is... I emailed them and their response it is supposed to be harder than bronze...... Shame they can't do their jobs and make a constructive piece of kit. I'll post the answer when i guess it right
0
reply
Igotanidea
Badges:
5
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#3
Hannah_ lawler
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#4
Report
#4
Do you know the answer to the one which says:Call the function you just wrote, in the same way you called initiate,then press ‘run code’
0
reply
Hannah_ lawler
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#5
winterscoming
Badges:
19
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#6
Report
#6
(Original post by Hannah_ lawler)
Do you know the answer to the one which says:Call the function you just wrote, in the same way you called initiate,then press ‘run code’
Do you know the answer to the one which says:Call the function you just wrote, in the same way you called initiate,then press ‘run code’
(Original post by Hannah_ lawler)
Do you know the answer too this one :
Do you know the answer too this one :
The block of instructions is everything in-between those { curly } brackets, although of course the { and } in your lifeSupportCheck is basically empty aside from the // comment. Therefore it's a function which actually wouldn't do anything if it were used, but that doesn't matter. The function can still exist and do-nothing when the program actually uses it

However, the code in your task only creates ('defines') the function (that's what the curly brackets are doing - i.e. linking the block of instructions with the name) - the code doesn't actually use that function. So even if it did contain any instructions, the program would never run those. The phrase 'call the function'. is just a programmer's way of saying "use this function as if it were a single instruction in your program to run it".
'calling' a function is a matter of using its name and the (rounded brackets), and ending with a semicolon. Your task mentions "the same way you called initiate" as a clue that you already have an example line in your program which calls the initiate function by doing this:
Code:
initiate();
(Just remember the order that you do things matters, like when making a cup of tea, you can't pour hot water before the kettle has finished boiling)
2
reply
Hannah_ lawler
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#7
Hannah_ lawler
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#8
Report
#8
(Original post by winterscoming)
Firstly, a function in programming is basically a named block of instructions - the task gives you one of those called lifeSupportCheck.
The block of instructions is everything in-between those { curly } brackets, although of course the { and } in your lifeSupportCheck is basically empty aside from the // comment. Therefore it's a function which actually wouldn't do anything if it were used, but that doesn't matter. The function can still exist and do-nothing when the program actually uses it
However, the code in your task only creates ('defines') the function (that's what the curly brackets are doing - i.e. linking the block of instructions with the name) - the code doesn't actually use that function. So even if it did contain any instructions, the program would never run those. The phrase 'call the function'. is just a programmer's way of saying "use this function as if it were a single instruction in your program to run it".
'calling' a function is a matter of using its name and the (rounded brackets), and ending with a semicolon. Your task mentions "the same way you called initiate" as a clue that you already have an example line in your program which calls the initiate function by doing this:
One last point on where to put the line - Programming languages' instructions flow downwards in-sequence, just like Written English, so the position in your program where you call the function is important. It needs to happen after the closing-curly-bracket } because the code needs to have finished the sequence of actually creating/defining the whole function before it's possible to actually call it
(Just remember the order that you do things matters, like when making a cup of tea, you can't pour hot water before the kettle has finished boiling)
Firstly, a function in programming is basically a named block of instructions - the task gives you one of those called lifeSupportCheck.
The block of instructions is everything in-between those { curly } brackets, although of course the { and } in your lifeSupportCheck is basically empty aside from the // comment. Therefore it's a function which actually wouldn't do anything if it were used, but that doesn't matter. The function can still exist and do-nothing when the program actually uses it

However, the code in your task only creates ('defines') the function (that's what the curly brackets are doing - i.e. linking the block of instructions with the name) - the code doesn't actually use that function. So even if it did contain any instructions, the program would never run those. The phrase 'call the function'. is just a programmer's way of saying "use this function as if it were a single instruction in your program to run it".
'calling' a function is a matter of using its name and the (rounded brackets), and ending with a semicolon. Your task mentions "the same way you called initiate" as a clue that you already have an example line in your program which calls the initiate function by doing this:
Code:
initiate();
(Just remember the order that you do things matters, like when making a cup of tea, you can't pour hot water before the kettle has finished boiling)
0
reply
winterscoming
Badges:
19
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#9
Report
#9
(Original post by Hannah_ lawler)
Not trying to be rude, but could you shorten that ?
Not trying to be rude, but could you shorten that ?

And an example of calling a function which is this (including the name, brackets and semicolon at the end) :
Code:
initiate();
1
reply
Hannah_ lawler
Badges:
2
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#10
Report
#10
(Original post by winterscoming)
Sorry for the long answer! It's useful to know what the code means anyway
And an example of calling a function which is this (including the name, brackets and semicolon at the end) :
so it's just asking you to 'call' your function, which is lifeSupportCheck();
Sorry for the long answer! It's useful to know what the code means anyway

And an example of calling a function which is this (including the name, brackets and semicolon at the end) :
Code:
initiate();
1
reply
toepeach1997
Badges:
6
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#11
Report
#11
does anyone know the answer for
$review = $_POST['review'];
insertIntoDatabase($review);
$review = $_POST['review'];
insertIntoDatabase($review);
0
reply
MiniFestSam
Badges:
1
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#12
Report
#12
(Original post by toepeach1997)
does anyone know the answer for
$review = $_POST['review'];
insertIntoDatabase($review);
does anyone know the answer for
$review = $_POST['review'];
insertIntoDatabase($review);
$review = escape_tags($review);
and just put that in the blank line between the two you already have.
its not much but play around with it and you'll get it

0
reply
toepeach1997
Badges:
6
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#13
Report
#13
(Original post by MiniFestSam)
i was stuck on this forever. in your notepad theres a code with escape tags. you just gotta follow that. can't remember exactly but i think the answer is something like
$review = escape_tags($review);
and just put that in the blank line between the two you already have.
its not much but play around with it and you'll get it
i was stuck on this forever. in your notepad theres a code with escape tags. you just gotta follow that. can't remember exactly but i think the answer is something like
$review = escape_tags($review);
and just put that in the blank line between the two you already have.
its not much but play around with it and you'll get it

0
reply
toepeach1997
Badges:
6
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#14
Report
#14
$myFormData = $_POST['comments'];
insertIntoDatabase($myFormData);
Does anyone know how to sanitise
insertIntoDatabase($myFormData);
Does anyone know how to sanitise
0
reply
RobTheGoblin
Badges:
5
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#15
Report
#15
(Original post by Diamonddolphin26)
I'm stuck on the Idea Silver badge on the first functions. This is what I typed down:
initiate();
function lifeSupportCheck() {
initiate();
}
Where have I gone wrong?
I'm stuck on the Idea Silver badge on the first functions. This is what I typed down:
initiate();
function lifeSupportCheck() {
initiate();
}
Where have I gone wrong?
initiate();
function lifeSupportCheck() {
//initiate(lifeSupportCheck);
}
1
reply
BonnieBunBuns
Badges:
0
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#16
BonnieBunBuns
Badges:
0
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#17
Report
#17
Nevermind, I completed it, i don't need help with it ;-;
Last edited by BonnieBunBuns; 2 years ago
0
reply
tinyminy13
Badges:
11
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#18
Report
#18
(Original post by toepeach1997)
$myFormData = $_POST['comments'];
insertIntoDatabase($myFormData);
Does anyone know how to sanitise
$myFormData = $_POST['comments'];
insertIntoDatabase($myFormData);
Does anyone know how to sanitise
should be:
$myFormData = escape_tags($myFormData);
insertIntoDatabase($myFormData)
You only need to replace the first line with the escape_tags variable and replace $message to $myFormData.
Hope this helps!
0
reply
Mehrin_09
Badges:
0
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#19
Report
#19
Has anyone done level 6 on the maker badge (sliver activation). The part with the sound blocks. I really need help!! T-T
0
reply
SIRE_boi
Badges:
0
Rep:
?
You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#20
Report
#20
(Original post by BonnieBunBuns)
Nevermind, I completed it, i don't need help with it ;-;
Nevermind, I completed it, i don't need help with it ;-;

0
reply
X
Page 1 of 1
Skip to page:
Quick Reply
Back
to top
to top