New game
Download
Get Academic Plan
Share game
Fill in the Blanks
Fill in the Blanks

Final Digital

Integrate it into your platform

You can integrate the game into an LMS compatible with LTI 1.1 or LTI 1.3 such as Canvas, Moodle, or Blackboard. This way, the scores will be automatically saved into the platform’s gradebook.
Download
You have exceeded the maximum number of games you can integrate into Google Classroom with your current Plan.

To integrate as many games as you want in Google Classroom, you need an Academic Plan or a Commercial Plan.

You have exceeded the maximum number of games you can integrate into Microsoft Teams with your current Plan.

To integrate as many games as you want in Microsoft Teams, you need an Academic Plan or a Commercial Plan.

Downloading games is an exclusive feature for users with an Academic Plan or a Commercial Plan.

Get your Academic Plan or your Commercial Plan now and start integrating your games into your LMS, website or blog.

If you wish, you can download a demo game here and test its integration:

Final Digital

Fill in the Blanks

Played 1 %Accuracy 100 Average time 01:47

About this activity

Final Digital

Created by

Bahrain

Download the paper version to play

Make your own free game from our game creator
Compete against your friends to see who gets the best score in this game

Top Games

%
Anonymous
Anonymous
%
%
%
You have exceeded the maximum number of games you can print with your current Plan.

To print as many games as you want, you need an Academic Plan or a Commercial Plan.

Print your game
Final Digital
 

Fill in the Blanks

Final DigitalOnline version

Final Digital

by Ali
1

import as tf
import time

# Create large matrices for comparison
matrix1 = tf . random . normal ( [ 10000 , 10000 ] ) # 10000x10000 matrix
matrix2 = tf . random . normal ( [ 10000 , 10000 ] ) # 10000x10000 matrix

# Perform matrix multiplication on GPU
start_time = time . time ( )
with tf . device ( ' / GPU : 0' ) :
result_gpu = tf . ( matrix1 , matrix2 )
gpu_time = time . time ( ) - start_time
print ( " Time taken on GPU : " , , " seconds " )

# Perform matrix multiplication on CPU
start_time = time . time ( )
with tf . device ( ' / CPU : 0' ) :
result_cpu = tf . ( matrix1 , matrix2 )
cpu_time = time . time ( ) - start_time
print ( " Time taken on CPU : " , cpu_time , " seconds " )

# Compare performance
print ( " GPU is " , cpu_time / gpu_time , " times faster than CPU ! " )

2

import numpy as

# Packet sizes in bytes captured
packet_sizes = np . ( [ 1500 , 64 , 120 , 1500 , 80 , 1500 , 64 , 1000 , 1500 , 64 ] )


average_packet_size = np . ( packet_sizes )
print ( f " Average packet size : { average_packet_size } bytes " )

# Find the maximum packet size
max_packet_size = np . ( packet_sizes )
print ( f " Maximum packet size : { max_packet_size } bytes " )

# Count the number of large packets
large_packet_threshold =
num_large_packets = np . ( > )
print ( f " Number of large packets : { num_large_packets } " )

# Calculate the percentage of large packets
percentage_large_packets = ( num_large_packets / ( packet_sizes ) ) *
print ( f " Percentage of large packets : { percentage_large_packets : . 2f } % " )

# Example of filtering : Get sizes of small packets ( e . g . , less than 100 bytes )
small_packets = packet_sizes [ packet_sizes < 100 ]
print ( f " Sizes of small packets : { small_packets } " )

# Example of element - wise operation : Add a constant overhead to each packet size
overhead = 20 # Example overhead in bytes
packet_sizes_with_overhead = packet_sizes + overhead
print ( f " Packet sizes with overhead : { packet_sizes_with_overhead } " )

# Detecting anomalies
# Calculate the standard deviation of packet sizes
std_dev = np . ( packet_sizes )

# Define a threshold for anomaly detection
anomaly_threshold = 2 * std_dev

# Find packets with sizes that deviate significantly from the mean
anomalous_packets = packet_sizes [ np . abs ( packet_sizes - average_packet_size ) > anomaly_threshold ]
print ( f " Potentially anomalous packet sizes : { anomalous_packets } " )

3

import as

df = . ( 'dataset1 . csv' )

print ( " First 5 rows : \ n " , df . ( ) )

print ( " Summary Statistics : \ n " , df . ( ) )

print ( " Features : \ n " , df . ( ) )

4

from sklearn . import train_test_split
from sklearn . import RandomForestClassifier from sklearn . import accuracy_score

X = [ [ 0 , 0 ] , [ 1 , 1 ] , [ 2 , 2 ] , [ 3 , 3 ] ]
y = [ 0 , 0 , 1 , 1 ] # 0 : benign , 1 : malicious

X_train , X_test , y_train , y_test = train_test_split ( X , y , test_size = 0 . 25 , random_state = 42 )

model = RandomForestClassifier ( )
model . fit ( X_train , y_train )

# Predict and evaluate
y_pred = model . predict ( X_test )
print ( " Accuracy : " , accuracy_score ( y_test , y_pred ) )

Are you sure you want to leave the page?

If you leave, you will lose the game in progress.