Answer:
import random
Explanation:
if it's python try import random
The only syntax error I saw was that the re pattern should have been double quoted.
Other
non-syntax errors are: the import statement doesn't have a valid module
name. It should be "import re" . Since tutorGroup is double quoted in
the re.match(), it becomes a string, not the variable from the input()
function.
Answer:
Explanation:
The following switch statement takes in the variable button as a parameter and outputs a statement saying what the character did due to the button being pushed.
switch (Character.toLowerCase(button.charAt(0))) {
case 'a': System.out.println("Your character has Jumped"); break;
case 'b': System.out.println("Your character has Crouched"); break;
case 'x': System.out.println("Your character has Punched"); break;
case 'y': System.out.println("Your character has Flown"); break;
default: System.out.println("Pause Menu has appeared"); break;
}
Answer:
overriding is defining a function in derived class with same name which is already exist in base class.
Explanation:
Override key word is used in DotNet for overriding .It differes from language to language.In c++ no keyword is required for overriding.
#include<iostream.h>
public class BaseClass
{
public :
void print(){
cout<<"print in base class";
}
}
public class DerivedClass : public BaseClass
{
public :
void print(){
cout<<"print in derived class";
}
}
void main(){
BaseClass b=new BaseClass();
b.print();
DerivedClass d=new DerivedClass();
d.print()
}