Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

PERL - Simple PERL scripts to do the following: 1. Use the script find_movie.pl

ID: 3813025 • Letter: P

Question

PERL - Simple PERL scripts to do the following:

1. Use the script find_movie.pl and movie_details.pl (find below question) to write a script that prompts the user for the title of a movie. It should then present the list it returns as a numbered or lettered list

eg.

A - The Lego Batman Movie (2017-02-08)

B - The Lego Movie (2014-02-06)

C - Lego Atlantis (2010-01-15)

D - A LEGO Brickumentary (2015-07-31)

Use the split function to remove the movie ID that appears before the colon, but keep it stored. Then once the user selects the movie, retrieve some information about the movie (the synopsis is a good choice) and display it to the user.

2. Write a script that gives a user 7 chances to select a number from a pool of 1-100. If the user's guess was within 50% of the total pool, remove the other half of the pool. Each time, the pool gets smaller by 50%. Use the redo function to re-run the iteration if the user guesses wrong, but make sure you are keeping track of the guesses.


Example -
Try #1 - The script picks the number 79. I guess 51. Since the total pool was 1-100, remove 1-50 and tell the user they were in the correct half and display the remaining numbers in the pool as well as the numbers guessed.
Try #2 -  The number to guess remains at 79. I guess 80. Since the total pool is now 51-100, remove 51-75 and tell the user they were in the correct half and display the remaining numbers in the pool as well as the numbers guessed.
Try #3 -  I guess 70. Since the total pool is now 76-100, remove 88-100 and tell the user they were in the correct half and display the remaining numbers in the pool as well as the numbers guessed.
Try #4 -  I guess 76. Since the total pool is now 76-87, remove 82-87 and tell the user they were in the correct half and display the remaining numbers in the pool as well as the numbers guessed
Try #5 -  I guess 81. Since the total pool is now 76-81, remove 76-78 and tell the user they were in the correct half.and display the remaining numbers in the pool as well as the numbers guessed.

The only option to guess is 79

HERE ARE THE .PL FILES WE MUST USE:

find_movie.pl:

use 5.13.0;

use strict;
use warnings;

my $movieName = <STDIN>;
chomp $movieName;

use TMDB;

# Initialize
my $tmdb = TMDB->new( apikey => 'YOUR KEY HERE' );

# Search
# =======

# Search for a movie
my @results = $tmdb->search->movie("$movieName");
foreach my $result (@results) {
printf( "%s: %s (%s) ",
$result->{id}, $result->{title},
split( /-/, $result->{release_date}, 1 ) );
}



movie_details.pl:
use 5.13.0;

use strict;
use warnings;

my $movieID = <STDIN>;
chomp $movieID;

use TMDB;

# Initialize
my $tmdb = TMDB->new( apikey => 'YOUR KEY HERE' );


# Get the movie object
my $movie = $tmdb->movie( id => "$movieID" );

# Movie Data (as returned by the API)
use Data::Dumper qw(Dumper);
print Dumper $movie->info;
  
# Get TMDB's version to check if anything changed
print $movie->version;

Explanation / Answer

If you would like to deploy a system of business intelligence or analyze previous records for your system, knowledge quality is one amongst the highest concerns! For a corporation to thrive within the market nowadays, knowledge consolidation and analysis is vital, quite virtually. Our terribly own ETL method comes into image here. From what I gathered regarding the full method, ETL may be a tree step method in direction and knowledge deposit -
Extract the info from varied sources into one repository, that might be homogenous or heterogeneous. Those knowledge sources are often relative databases, spreadsheets, XML files, CSV files etc.
Transform the info into the specified schema. this might embrace varied mapping functions to cleanse the info before it's enraptured into the new system, or filtering the info to create it apothegmatic and prepared to use, or ever-changing the info format victimization bound rules or search tables (since the format of the previous system might take issue from the new one!)
Load the remodeled knowledge into the destination information, or the warehouse.
Let's take associate degree example for higher understanding. Suppose you've got an internet order process system that processes the orders that customers place at you eCommerce. The system stores the order even once they're shipped (with the standing "completed"). however this would possibly clog your information with a whopping quantity of previous orders. you would possibly wish to maneuver those completed orders for higher management, data processing and analysis to a brand new system that contains simply those orders.

So, to consolidate the historical knowledge from all disparate sources, you found out associate degree ETL system, that transforms the info from the smaller databases into the a lot of important long-run databases.

Based on the complexness of your operating atmosphere, you'll obtain an acceptable ETL tool for your purpose, or lo and see, you'll even build one amongst your own employing a appropriate programming language! Speaking of complexness, however specifically to we all know however advanced is our environment? outline what number supply systems we've got feeding our ETL system. Next outline what reasonably transformation is needed in your knowledge and the way troublesome it to use this transformation to suit the present knowledge into the target system. Lastly, style a electrical circuit to perpetually check for errors and discrepancies in our ETL system. There you go! You currently have your own Extract, rework and Load!