SlideShare a Scribd company logo
1 of 1
Download to read offline
4. For the quicksplit.py script modify the script to print to the user al the keys and let the user
select which key to print values for via the input function.#1 /usr/bin/env python #-* coding: utf 8=
'isplit file and create a list 11 FileName = "datasplit. txt" Reader = open (Fi leName, ' r ' ) Delim = ' t
ValueList =[] valueDict ={} for Line in Reader: AllVals = Line, split(Delim) x,y= Allvals [:2] # Make a
Dictionary valuedict [x]=f loat (y) # Also a List ValueList. append (x,float(y)]) Reader.close() # print
out the values of Valuedict for each key A in Querylist, # hint: remember two ways to retrieve from
a dictionary # Note start with something that works and then move on. Querylist = ['HK', 'MP', 'QT',
'ZZ'] # print valuedict H fast way for Query in Querylist: print Query, ' ', Valuedict. get(Query, 'not
found') H slower way Keylist = Valuedict keys() for Query in Querylist: if Query in Keylist: else:
print Query, " ', Valuedict [Query] print Query, 'not found. 4 print "KEYs an", valuedict, keys() w
print valuelistADBECFDGEHEIGJHKILJMKNLOMPNQORPSQTRUSVTWUXVYWZ0149162536
496481100121144169196225256289324361400441484cdefghijk1mnopqrstuvwxy

More Related Content

Similar to 4 For the quicksplitpy script modify the script to print t.pdf

Functions2.pdf
Functions2.pdfFunctions2.pdf
Functions2.pdfprasnt1
 
C++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfC++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfsaradashata
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical fileAnkit Dixit
 
Cis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCIS321
 
IN C++ languageWrite a simple word processor that will accept text.pdf
IN C++ languageWrite a simple word processor that will accept text.pdfIN C++ languageWrite a simple word processor that will accept text.pdf
IN C++ languageWrite a simple word processor that will accept text.pdfaratextails30
 
Beginner's Python Cheat Sheet.pdf
Beginner's Python Cheat Sheet.pdfBeginner's Python Cheat Sheet.pdf
Beginner's Python Cheat Sheet.pdfAkhileshKumar436707
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxCatherineVania1
 
The Ring programming language version 1.5.3 book - Part 18 of 184
The Ring programming language version 1.5.3 book - Part 18 of 184The Ring programming language version 1.5.3 book - Part 18 of 184
The Ring programming language version 1.5.3 book - Part 18 of 184Mahmoud Samir Fayed
 
C++ Please test your program before you submit the answer.pdf
C++ Please test your program before you submit the answer.pdfC++ Please test your program before you submit the answer.pdf
C++ Please test your program before you submit the answer.pdfaashisha5
 
Linq and lambda
Linq and lambdaLinq and lambda
Linq and lambdaJohn Walsh
 
File Type cppAdd the following to your linked list of strings pro.pdf
File Type cppAdd the following to your linked list of strings pro.pdfFile Type cppAdd the following to your linked list of strings pro.pdf
File Type cppAdd the following to your linked list of strings pro.pdffootworld1
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manualSami Said
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...DRVaibhavmeshram1
 
python cheat sheat, Data science, Machine learning
python cheat sheat, Data science, Machine learningpython cheat sheat, Data science, Machine learning
python cheat sheat, Data science, Machine learningTURAGAVIJAYAAKASH
 
Beginner's Python Cheat Sheet
Beginner's Python Cheat SheetBeginner's Python Cheat Sheet
Beginner's Python Cheat SheetVerxus
 
beginners_python_cheat_sheet_pcc_all (1).pdf
beginners_python_cheat_sheet_pcc_all (1).pdfbeginners_python_cheat_sheet_pcc_all (1).pdf
beginners_python_cheat_sheet_pcc_all (1).pdfElNew2
 
Python programming
Python programmingPython programming
Python programmingsaroja20
 
Machine learning session3(intro to python)
Machine learning   session3(intro to python)Machine learning   session3(intro to python)
Machine learning session3(intro to python)Abhimanyu Dwivedi
 

Similar to 4 For the quicksplitpy script modify the script to print t.pdf (20)

Functions2.pdf
Functions2.pdfFunctions2.pdf
Functions2.pdf
 
C++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdfC++ Background Circular Linked List A circular linked list.pdf
C++ Background Circular Linked List A circular linked list.pdf
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
 
Cis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential filesCis 170 c ilab 7 of 7 sequential files
Cis 170 c ilab 7 of 7 sequential files
 
IN C++ languageWrite a simple word processor that will accept text.pdf
IN C++ languageWrite a simple word processor that will accept text.pdfIN C++ languageWrite a simple word processor that will accept text.pdf
IN C++ languageWrite a simple word processor that will accept text.pdf
 
Beginner's Python Cheat Sheet.pdf
Beginner's Python Cheat Sheet.pdfBeginner's Python Cheat Sheet.pdf
Beginner's Python Cheat Sheet.pdf
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptx
 
The Ring programming language version 1.5.3 book - Part 18 of 184
The Ring programming language version 1.5.3 book - Part 18 of 184The Ring programming language version 1.5.3 book - Part 18 of 184
The Ring programming language version 1.5.3 book - Part 18 of 184
 
C++ Please test your program before you submit the answer.pdf
C++ Please test your program before you submit the answer.pdfC++ Please test your program before you submit the answer.pdf
C++ Please test your program before you submit the answer.pdf
 
Linq and lambda
Linq and lambdaLinq and lambda
Linq and lambda
 
File Type cppAdd the following to your linked list of strings pro.pdf
File Type cppAdd the following to your linked list of strings pro.pdfFile Type cppAdd the following to your linked list of strings pro.pdf
File Type cppAdd the following to your linked list of strings pro.pdf
 
Programming Assignment Help
Programming Assignment HelpProgramming Assignment Help
Programming Assignment Help
 
Lex tool manual
Lex tool manualLex tool manual
Lex tool manual
 
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
Introduction to Python 01-08-2023.pon by everyone else. . Hence, they must be...
 
2. Python Cheat Sheet.pdf
2. Python Cheat Sheet.pdf2. Python Cheat Sheet.pdf
2. Python Cheat Sheet.pdf
 
python cheat sheat, Data science, Machine learning
python cheat sheat, Data science, Machine learningpython cheat sheat, Data science, Machine learning
python cheat sheat, Data science, Machine learning
 
Beginner's Python Cheat Sheet
Beginner's Python Cheat SheetBeginner's Python Cheat Sheet
Beginner's Python Cheat Sheet
 
beginners_python_cheat_sheet_pcc_all (1).pdf
beginners_python_cheat_sheet_pcc_all (1).pdfbeginners_python_cheat_sheet_pcc_all (1).pdf
beginners_python_cheat_sheet_pcc_all (1).pdf
 
Python programming
Python programmingPython programming
Python programming
 
Machine learning session3(intro to python)
Machine learning   session3(intro to python)Machine learning   session3(intro to python)
Machine learning session3(intro to python)
 

More from mohammadabbaruddin

4 Use the below contingency table to find the following pr.pdf
4 Use the below contingency table to find the following pr.pdf4 Use the below contingency table to find the following pr.pdf
4 Use the below contingency table to find the following pr.pdfmohammadabbaruddin
 
4 Use an X for the nursing actions listed below that are In.pdf
4 Use an X for the nursing actions listed below that are In.pdf4 Use an X for the nursing actions listed below that are In.pdf
4 Use an X for the nursing actions listed below that are In.pdfmohammadabbaruddin
 
4 This question explores IS and FX equilibria in a numerica.pdf
4 This question explores IS and FX equilibria in a numerica.pdf4 This question explores IS and FX equilibria in a numerica.pdf
4 This question explores IS and FX equilibria in a numerica.pdfmohammadabbaruddin
 
4 To meet the increased oxygen demands of muscles during ex.pdf
4 To meet the increased oxygen demands of muscles during ex.pdf4 To meet the increased oxygen demands of muscles during ex.pdf
4 To meet the increased oxygen demands of muscles during ex.pdfmohammadabbaruddin
 
4 There is a gene that plays a role in determining the shap.pdf
4 There is a gene that plays a role in determining the shap.pdf4 There is a gene that plays a role in determining the shap.pdf
4 There is a gene that plays a role in determining the shap.pdfmohammadabbaruddin
 
4 There are 8 Muppet movies which received theatrical relea.pdf
4 There are 8 Muppet movies which received theatrical relea.pdf4 There are 8 Muppet movies which received theatrical relea.pdf
4 There are 8 Muppet movies which received theatrical relea.pdfmohammadabbaruddin
 
4 There are dark lines in the absorption spectrum that repr.pdf
4 There are dark lines in the absorption spectrum that repr.pdf4 There are dark lines in the absorption spectrum that repr.pdf
4 There are dark lines in the absorption spectrum that repr.pdfmohammadabbaruddin
 
4 The small fish in the web are eaten by the crab because t.pdf
4 The small fish in the web are eaten by the crab because t.pdf4 The small fish in the web are eaten by the crab because t.pdf
4 The small fish in the web are eaten by the crab because t.pdfmohammadabbaruddin
 
4 The following is a pedigree of a family in which a rare f.pdf
4 The following is a pedigree of a family in which a rare f.pdf4 The following is a pedigree of a family in which a rare f.pdf
4 The following is a pedigree of a family in which a rare f.pdfmohammadabbaruddin
 
4 Suppose that x1x2xp form a random sample from a uniform.pdf
4 Suppose that x1x2xp form a random sample from a uniform.pdf4 Suppose that x1x2xp form a random sample from a uniform.pdf
4 Suppose that x1x2xp form a random sample from a uniform.pdfmohammadabbaruddin
 
4 Relative valuation Other things remaining equal the PBV .pdf
4 Relative valuation Other things remaining equal the PBV .pdf4 Relative valuation Other things remaining equal the PBV .pdf
4 Relative valuation Other things remaining equal the PBV .pdfmohammadabbaruddin
 
4 Suppose an experimenter wishes to test H00100 versus H1.pdf
4 Suppose an experimenter wishes to test H00100 versus H1.pdf4 Suppose an experimenter wishes to test H00100 versus H1.pdf
4 Suppose an experimenter wishes to test H00100 versus H1.pdfmohammadabbaruddin
 
4 Suppose a firms production function is fKL10K06L04.pdf
4 Suppose a firms production function is fKL10K06L04.pdf4 Suppose a firms production function is fKL10K06L04.pdf
4 Suppose a firms production function is fKL10K06L04.pdfmohammadabbaruddin
 
4 Summarize several of the institutions affecting the facto.pdf
4 Summarize several of the institutions affecting the facto.pdf4 Summarize several of the institutions affecting the facto.pdf
4 Summarize several of the institutions affecting the facto.pdfmohammadabbaruddin
 
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdfmohammadabbaruddin
 
4 Small Sample Differences in means Two people go to a sma.pdf
4 Small Sample Differences in means Two people go to a sma.pdf4 Small Sample Differences in means Two people go to a sma.pdf
4 Small Sample Differences in means Two people go to a sma.pdfmohammadabbaruddin
 
4 Sawyer Industries Inc SII developed standard costs for.pdf
4 Sawyer Industries Inc SII developed standard costs for.pdf4 Sawyer Industries Inc SII developed standard costs for.pdf
4 Sawyer Industries Inc SII developed standard costs for.pdfmohammadabbaruddin
 
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdfmohammadabbaruddin
 
4 Interpret each coefficient in the regression result win.pdf
4 Interpret each coefficient in the regression result win.pdf4 Interpret each coefficient in the regression result win.pdf
4 Interpret each coefficient in the regression result win.pdfmohammadabbaruddin
 
4 points Sampling in Rwanda A political science professo.pdf
4 points Sampling in Rwanda  A political science professo.pdf4 points Sampling in Rwanda  A political science professo.pdf
4 points Sampling in Rwanda A political science professo.pdfmohammadabbaruddin
 

More from mohammadabbaruddin (20)

4 Use the below contingency table to find the following pr.pdf
4 Use the below contingency table to find the following pr.pdf4 Use the below contingency table to find the following pr.pdf
4 Use the below contingency table to find the following pr.pdf
 
4 Use an X for the nursing actions listed below that are In.pdf
4 Use an X for the nursing actions listed below that are In.pdf4 Use an X for the nursing actions listed below that are In.pdf
4 Use an X for the nursing actions listed below that are In.pdf
 
4 This question explores IS and FX equilibria in a numerica.pdf
4 This question explores IS and FX equilibria in a numerica.pdf4 This question explores IS and FX equilibria in a numerica.pdf
4 This question explores IS and FX equilibria in a numerica.pdf
 
4 To meet the increased oxygen demands of muscles during ex.pdf
4 To meet the increased oxygen demands of muscles during ex.pdf4 To meet the increased oxygen demands of muscles during ex.pdf
4 To meet the increased oxygen demands of muscles during ex.pdf
 
4 There is a gene that plays a role in determining the shap.pdf
4 There is a gene that plays a role in determining the shap.pdf4 There is a gene that plays a role in determining the shap.pdf
4 There is a gene that plays a role in determining the shap.pdf
 
4 There are 8 Muppet movies which received theatrical relea.pdf
4 There are 8 Muppet movies which received theatrical relea.pdf4 There are 8 Muppet movies which received theatrical relea.pdf
4 There are 8 Muppet movies which received theatrical relea.pdf
 
4 There are dark lines in the absorption spectrum that repr.pdf
4 There are dark lines in the absorption spectrum that repr.pdf4 There are dark lines in the absorption spectrum that repr.pdf
4 There are dark lines in the absorption spectrum that repr.pdf
 
4 The small fish in the web are eaten by the crab because t.pdf
4 The small fish in the web are eaten by the crab because t.pdf4 The small fish in the web are eaten by the crab because t.pdf
4 The small fish in the web are eaten by the crab because t.pdf
 
4 The following is a pedigree of a family in which a rare f.pdf
4 The following is a pedigree of a family in which a rare f.pdf4 The following is a pedigree of a family in which a rare f.pdf
4 The following is a pedigree of a family in which a rare f.pdf
 
4 Suppose that x1x2xp form a random sample from a uniform.pdf
4 Suppose that x1x2xp form a random sample from a uniform.pdf4 Suppose that x1x2xp form a random sample from a uniform.pdf
4 Suppose that x1x2xp form a random sample from a uniform.pdf
 
4 Relative valuation Other things remaining equal the PBV .pdf
4 Relative valuation Other things remaining equal the PBV .pdf4 Relative valuation Other things remaining equal the PBV .pdf
4 Relative valuation Other things remaining equal the PBV .pdf
 
4 Suppose an experimenter wishes to test H00100 versus H1.pdf
4 Suppose an experimenter wishes to test H00100 versus H1.pdf4 Suppose an experimenter wishes to test H00100 versus H1.pdf
4 Suppose an experimenter wishes to test H00100 versus H1.pdf
 
4 Suppose a firms production function is fKL10K06L04.pdf
4 Suppose a firms production function is fKL10K06L04.pdf4 Suppose a firms production function is fKL10K06L04.pdf
4 Suppose a firms production function is fKL10K06L04.pdf
 
4 Summarize several of the institutions affecting the facto.pdf
4 Summarize several of the institutions affecting the facto.pdf4 Summarize several of the institutions affecting the facto.pdf
4 Summarize several of the institutions affecting the facto.pdf
 
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf
4 Quantum counting 3 marks Suppose f012n01 with a pr.pdf
 
4 Small Sample Differences in means Two people go to a sma.pdf
4 Small Sample Differences in means Two people go to a sma.pdf4 Small Sample Differences in means Two people go to a sma.pdf
4 Small Sample Differences in means Two people go to a sma.pdf
 
4 Sawyer Industries Inc SII developed standard costs for.pdf
4 Sawyer Industries Inc SII developed standard costs for.pdf4 Sawyer Industries Inc SII developed standard costs for.pdf
4 Sawyer Industries Inc SII developed standard costs for.pdf
 
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf
4 Qu afirmacin es verdadera sobre estadsticas y datos .pdf
 
4 Interpret each coefficient in the regression result win.pdf
4 Interpret each coefficient in the regression result win.pdf4 Interpret each coefficient in the regression result win.pdf
4 Interpret each coefficient in the regression result win.pdf
 
4 points Sampling in Rwanda A political science professo.pdf
4 points Sampling in Rwanda  A political science professo.pdf4 points Sampling in Rwanda  A political science professo.pdf
4 points Sampling in Rwanda A political science professo.pdf
 

Recently uploaded

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use CasesTechSoup
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonhttgc7rh9c
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfElizabeth Walsh
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxRugvedSathawane
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code ExamplesPeter Brusilovsky
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsPallavi Parmar
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaEADTU
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....Ritu480198
 

Recently uploaded (20)

Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Introduction to TechSoup’s Digital Marketing Services and Use Cases
Introduction to TechSoup’s Digital Marketing  Services and Use CasesIntroduction to TechSoup’s Digital Marketing  Services and Use Cases
Introduction to TechSoup’s Digital Marketing Services and Use Cases
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lessonQUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
QUATER-1-PE-HEALTH-LC2- this is just a sample of unpacked lesson
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Orientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdfOrientation Canvas Course Presentation.pdf
Orientation Canvas Course Presentation.pdf
 
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptxMichaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
Michaelis Menten Equation and Estimation Of Vmax and Tmax.pptx
 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
 
Ernest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell TollsErnest Hemingway's For Whom the Bell Tolls
Ernest Hemingway's For Whom the Bell Tolls
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....diagnosting testing bsc 2nd sem.pptx....
diagnosting testing bsc 2nd sem.pptx....
 

4 For the quicksplitpy script modify the script to print t.pdf

  • 1. 4. For the quicksplit.py script modify the script to print to the user al the keys and let the user select which key to print values for via the input function.#1 /usr/bin/env python #-* coding: utf 8= 'isplit file and create a list 11 FileName = "datasplit. txt" Reader = open (Fi leName, ' r ' ) Delim = ' t ValueList =[] valueDict ={} for Line in Reader: AllVals = Line, split(Delim) x,y= Allvals [:2] # Make a Dictionary valuedict [x]=f loat (y) # Also a List ValueList. append (x,float(y)]) Reader.close() # print out the values of Valuedict for each key A in Querylist, # hint: remember two ways to retrieve from a dictionary # Note start with something that works and then move on. Querylist = ['HK', 'MP', 'QT', 'ZZ'] # print valuedict H fast way for Query in Querylist: print Query, ' ', Valuedict. get(Query, 'not found') H slower way Keylist = Valuedict keys() for Query in Querylist: if Query in Keylist: else: print Query, " ', Valuedict [Query] print Query, 'not found. 4 print "KEYs an", valuedict, keys() w print valuelistADBECFDGEHEIGJHKILJMKNLOMPNQORPSQTRUSVTWUXVYWZ0149162536 496481100121144169196225256289324361400441484cdefghijk1mnopqrstuvwxy