Sesiones de PyR
1
1 Voto
6 Respuestasfunction 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 Votos
9 RespuestasHelp me fix this code
1 Voto
1 RespuestaOOP Goblin Game
0 Votos
1 RespuestaOr in if?
0 Votos
2 Respuestaspyrhon
-1 Voto
2 RespuestasRestart Button
0 Votos
2 RespuestasHello 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 Votos
8 RespuestasMethod in python
0 Votos
2 Respuestaswhat 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 Votos
5 Respuestaspython 3
0 Votos
1 Respuesta9
2 Votos
6 Respuestasmy_sort
0 Votos
1 Respuesta#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 Votos
1 RespuestaTo 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 Votos
1 RespuestaEn tendencia hoy
Sticky position
3 Votes
Help please?
3 Votes
Ejercicio Pytho
0 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes