ScholarMatic | 24/7 Homework Help

ScholarMatic Will Help You Write Your Essays and Term Papers

Answered » You can buy a ready-made answer or pick a professional tutor to order an original one.

In-put-data file: datafile.

by | Nov 28, 2023 | computer science

In-put-data file:

datafile.txt = {increasement 822 tonsillolith sope 149 808 pollinigerous earth-devouring 609 881 181 731 226 539 249 274 817 692 poduran 267 749 657 forelaying 737 505

393 267 276 985 geld 3 20 640 305 squillagee 595 limited 836 crotcheting 742 352 UPI superintolerable 71 315 675 599 257 675 596

earth-god 629}

myMapper.py

#!/usr/bin/python 

import sys 

resultNumbers = [] 

for line in sys.stdin : 

listA = line.split(” “) 

for i in listA : 

if(i.isdigit()): 

if(int(i) % 2 != 0): 

if(i not in resultNumbers): 

resultNumbers.append(int(i)) 

# print the odd numbers 

print(“The odd numbers in input : “+ str(resultNumbers)) 

The data that comes from the above script myMapper.py must be feed-in as the input-file as the python script below 

myReducer.py

myReducer.py

#!/usr/bin/python

import sys

resultNumbers = []

for line in sys.stdin:

  listA = line.split(” “)

  for i in listA:

    if(i.is_number()):

      if(int(i)%2!=0):

        if(i not in resultNumbers):

          resultNumbers.append(int(i))

You may tweak either python script as need!!!

please provide a screen capture of both runs

DO NOT INCLUDE THE DATA WITHIN THE PYTHON SCRIPTS. DATA MUST BE EXTERIOR FILES.

ScholarMatic: Explanation & Answer

Your ready answer from a verified tutor is just a click away for as little as $14.99


  

Click Order Now to get 100% Original Answer Customized to your instructions!

HOME TO CERTIFIED WRITERS

Why Place An Order With Us?

  • Certified Editors
  • 24/7 Customer Support
  • Profesional Research
  • Easy to Use System Interface
  • Student Friendly Pricing

Have a similar question?

PLAGIRAISM FREE PAPERS

All papers we provide are well-researched, properly formatted and cited.

TOP QUALITY

All papers we provide are well-researched, properly formatted and cited.

HIGHLY SECURED

All papers we provide are well-researched, properly formatted and cited.

ScholarMatic: Get Started

Assignment Writing Service

Feel safe and secure when placing an order on our portal!
Fruitful cooperation begins with solid guarantees, and we are professional enough to promise perfect results. Let’s get it started!