The correct answer to the following question will be "Auto-encoder".
Explanation:
It is indeed a form of artificial neural net that utilizes in an unmonitored way to practice successful information coding.
The objective of such an auto-encoder seems to be to acquire a specification (encoding) for a collection of information, usually for reducing degrees of freedom, by teaching the channel to overlook the "noise" message.Learn a few things of endogenous model representation and then use it to recreate the object.boolean rsvp;
int selection;
String option1;
String option2;
(a) if(rsvp){
System.out.println("Attending");
} else {
System.out.println("Not attending");
}
(b) if (selection == 1){
System.out.println("Beef");
} else if (selection == 2){
System.out.println("Chicken");
} else if (selection == 3) {
System.out.println("Pasta");
} else {
System.out.println("Fish");
}
(c) switch(selection){
case 1:
if(rsvp){
option1 = "Thanks for attending. You will be served beef.";
} else{
option1 = "Sorry you can't make it";
}
break;
case 2:
if(rsvp){
option1 = "Thanks for attending. You will be served chicken.";
} else{
option1 = "Sorry you can't make it";
}
break;
case 3:
if(rsvp){
option1 = "Thanks for attending. You will be served pasta.";
} else{
option1 = "Sorry you can't make it";
}
break;
default:
if(rsvp){
option1 = "Thanks for attending. You will be served fish.";
} else{
option1 = "Sorry you can't make it";
}
break;
}
(d) if (option1 == option2){
System.out.println("True");
} else {
System.out.println("False");
}
Explanation:
This code snippet is written in Java.
a) Uses if statement to print "attending" if rsvp is true and "not attending" if rsvp is false.
b) Uses if-else statement to print the variety of food based on user selection. If selection is 1, it print beef. If selection is 2, it print chicken. If selection is 3, it prints pasta else it print fish for any other value of selection.
c) Uses switch statement to determine the value of selection and then uses inner if statement to assign "Thanks for attending. You will be served beef." if rsvp is true to option1. The value of beef changes depending on the value of selection. If rsvp is false, then "Sorry you can't make it." is assigned to option1.
d) Uses if statement to print true if option1 and option2 are equal else it print false.
I think that 3 would be the correct answer
(1)
public int getPlayer2Move(int round)
{
int result = 0;
//If round is divided by 3
if(round%3 == 0) {
result= 3;
}
//if round is not divided by 3 and is divided by 2
else if(round%3 != 0 && round%2 == 0) {
result = 2;
}
//if round is not divided by 3 or 2
else {
result = 1;
}
return result;
}
(2)
public void playGame()
{
//Initializing player 1 coins
int player1Coins = startingCoins;
//Initializing player 2 coins
int player2Coins = startingCoins;
for ( int round = 1 ; round <= maxRounds ; round++) {
//if the player 1 or player 2 coins are less than 3
if(player1Coins < 3 || player2Coins < 3) {
break;
}
//The number of coins player 1 spends
int player1Spends = getPlayer1Move();
//The number of coins player 2 spends
int player2Spends = getPlayer2Move(round);
//Remaining coins of player 1
player1Coins -= player1Spends;
//Remaining coins of player 2
player2Coins -= player2Spends;
//If player 2 spends the same number of coins as player 2 spends
if ( player1Spends == player2Spends) {
player2Coins += 1;
continue;
}
//positive difference between the number of coins spent by the two players
int difference = Math.abs(player1Spends - player2Spends) ;
//if difference is 1
if( difference == 1) {
player2Coins += 1;
continue;
}
//If difference is 2
if(difference == 2) {
player1Coins += 2;
continue;
}
}
// At the end of the game
//If player 1 coins is equal to player two coins
if(player1Coins == player2Coins) {
System.out.println("tie game");
}
//If player 1 coins are greater than player 2 coins
else if(player1Coins > player2Coins) {
System.out.println("player 1 wins");
}
//If player 2 coins is grater than player 2 coins
else if(player1Coins < player2Coins) {
System.out.println("player 2 wins");
}
}
Question:
A customer is travelling to a branch office, and the network administrator provides her with a static IP address for her laptop Which should the customer do to use the static IP address?
A) Run the command "ipconfig configure static"
B) Assign the static IP in network adapter settings
C) Switch the button from dynamic to static on her laptop
D) Disconnect from WiFi and use an Ethernet cable
E) Type the IP address into the browser
The correct answer is B) Assign the static IP in network adapter settings
Explanation:
To execute the above, one must take the following steps:
Click on the Network icon at the bottom right of the desktop. Click on "Open Network and Sharing Center" Select "Change Adapter Settings" in the left toolbar. Right-Click on the appropriate adapter (Local Area Connection for direct connection to computer then click on Properties TabSelect Internet Protocol Version 4 then click on the Propertie TabMake note of the current IP settings for the computer. Select "Use the Following IP Address". Type in the desired IP Address for the computer that was given by the Network AdministratorClick on "Ok" or "Save"Cheers
The is_positive function should return True if the number received is positive, otherwise it returns None. Can you fill in the gaps to make that happen?
def is_positive(number):
if :
return
def is_positive(number):
if (number > 0):
return True
else:
return "None"
Code Test and Sample Output:print(is_positive(6))
>> True
print(is_positive(-7))
>> None
Explanation:The code above has been written in Python.
Now, let's explain each of the lines of the code;
Line 1: defines a function called is_positive which takes in a parameter number. i.e
def is_positive(number):
Line 2: checks if the number, supplied as parameter to the function, is positive. A number is positive if it is greater than zero. i.e
if (number > 0):
Line 3: returns a boolean value True if the number is positive. i.e
return True
Line 4: defines the beginning of the else block that is executed if the number is not positive. i.e
else:
Line 5: returns a string value "None" if the number is not positive. i.e
return "None"
All of these put together gives;
def is_positive(number):
if (number > 0):
return True
else:
return "None"
An example test of the code has also been given where the function was been called with an argument value of 6 and -7. The results were True and None respectively. i.e
print(is_positive(6)) = True
print(is_positive(-7)) = None
Public String getHostName()
{
Return hostName;
}
Public String setAddress(String ad)
{
address=ad;
}
Public String invite(String nme)
{
Return “Dear “+nme+“, please attend my event at ”+address+“. See you
then, ”+hostName+ “.”
}
Explanation: