Q&A Discussions
function can_i_enter(age)
if (age < 6) { document.write ("you are not allowed to watch Dead pool after 6:00pm.");}
else if (age>=6 && age<17) {document.write("you must be accompanied by a guardian who is 21 or older.");}
else if (age>=17 && age<25) {document.write ("you are allowed to watch Dead pool, right after you show some ID. ")}
else if (age>=25) { document.write ("Yah! you can watch Dead pool with no strings attached!");}
else { document.write ("Invalid age. ");}
can_i_enter (24);
0 Votes
9 AnswersHelp me fix this code
1 Vote
1 AnswerOOP Goblin Game
0 Votes
1 AnswerRestart Button
0 Votes
2 AnswersHello guys right now I am kinda of new in python
my question is related to the function call len()
len() its print out the character but here it's the confusing part, I am working with a list let me explain an example
players
['lee', 'bob', 'moe', 'joe']
len(players)
4
why it's giving me 4 item in the list I thought len it counts the characters and if I do this it give me the correct somewhat answer what I am seeking,
len(players [-1])
3
0 Votes
8 AnswersMethod in python
0 Votes
2 Answerswhat will be output??
#include <iostream>
using namespace std;
int main(int a)
{
cout << a << "\n";
return 0;
}
int main(char *a)
{
cout << a << endl;
return 0;
}
int main(int a, int b)
{
cout << a << " " << b;
return 0;
}
int main()
{
main(3);
main("Subodh");
main(9, 6);
return 0;
}
if output is compilation compilation error then how can we overload "main" function in C++
0 Votes
5 Answers#include <iostream>
using namespace std;
class A{
public:
void f1();
};
class B : public A{
public:
virtual void f1();
}
int main()
{
A * obj = new B;
obj.f1();
}
Ques: can we write virtual before an overridden function from the base class?? if yes which f1() should it call base class f1() or derived class f1()???
0 Votes
1 AnswerTo bind two things of similar origin but separate identities together as one unit with ability to function independently as long and the unit is not corrupted. How to set x to get y and become z permanently and protect the unit from corrupt or deviation or denying or hiding while z securely functions actively is the purpose.
0 Votes
1 AnswerHot today
Sticky position
2 Votes
Help please?
3 Votes
Online voting system
2 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes