Abhinav and Anjali are playing the Tic-Tac-Toe game. Tic-Tac-Toe is a game played on a grid that's three squares by three squares. Abhinav is O, and Anjali is X. Players take turns putting their marks in empty squares. The first player to get 3 of her marks in a diagonal or horizontal, or vertical row is the winner. When all nine squares are complete, the game is over. If no player has three marks in a row, the game ends in a tie. Write a program to decide the winner in the Tic-Tac-Toe game.
b)Classify following example Fast yes or no using baysean classification algorithm Engine = Small , SC/Turbo= Yes , Weight=Light , Fuel Eco= Good
Write a python program to check if a given 3-digit number
X is an Armstrong number or not. Note: A number is an Armstrong number if the number is equal to the sum of the Nth power of its digits.
Rearrange Numbers in String
Given a string, write a program to re-arrange all the numbers appearing in the string in decreasing order. Note: There will not be any negative numbers or numbers with decimal part.
Input
The input will be a single line containing a string.
Output
The output should be a single line containing the modified string with all the numbers in string re-ordered in decreasing order.
Explanation
For example, if the given string is "I am 5 years and 11 months old", the numbers are 5, 11. Your code should print the sentence after re-ordering the numbers as "I am 11 years and 5 months old".
Sample Input
I am 5 years and 11 months old
Sample Output
I am 11 years and 5 months old
Sample Input 2:
I am 11 years 5 months, 26 weeks and 38 days old
Sample output:
I am 38 years 26 months, 11 weeks and 5 days old
Simulate a two dimensional random walk and provide a picture of it
By using single layer perceptron algorithm classify the following patterns. Where X1 and X2 are inputs Y is the output. Learning rate is 0.5 , output is 1 if weighted sum >=0.5 otherwise 0 and weights w1 =0.2 and w2 = 0.3
Write an algorithm for the network administrator to help him find number of data characters that do not change position even after the data stream is reversed