MAIN COURSE Google IT Automation with Python Professional Certificate Having 6 crouse 1st course was Python Crash which I have DONE got certificate . My friend say 'bati bana kar gand meen dalo' Course No 2 Using Python to Interact with the Operating System ------------------------------ course 2 week 5 added By inputting emp name the program will return its email address By inputing Blossom Gill program will return his email aress blossom@abc.edu Our job is to 1. add a test means test cases like basic_test Edge_test see the bugs, 2. make the necessary corrections in email.py Python file to correct the bugs 3. verify that all the tests pass to make sure the script works! 4. This is The End Lab . Best of luck! and Congrautulations Once again, in other words, same matter/problem as mentioned above What you'll do In this lab, you will: Write a simple test (basic test )to check for basic functionality Write a test...
Creating, Reading and Writing $ pip install pandas $ python3 >>> import pandas as pd >>> pd.DataFrame({'BOB':['Ist column of BOB','IInd col of BoB'],'SUSE':['Ist col suse','II col suse']}) BOB SUSE 0 Ist column of BOB Ist col suse 1 IInd col of BoB II col suse >>>pd.DataFrame({..same as above---},index=['Prouct a ',' Product b']) >>> pd.Series([30, 35, 40], index=['2015 Sales', '2016 Sales', '2017 Sales'], name='Product A') 2015 Sales 30 2016 Sales 35 2017 Sales 40 Name: Product A, dtype: int64 >>> reviews=pd.read_csv('/mnt/d/wine.csv') >>> reviews show the contents of file wine.csv >>> reviews.country >>> reviews['country'] to see only country column >>> reviews.iloc[0] return only one row >>> review.il...
4.1 Applied Python (Advnaced Course) https://brilliant.org/courses/python-text-analysis/dictionaries-and-counters/?from_llp=computer-science Lesson 3 Counting Unique Words Instead of dictionary use Counter() function it is more handly No need to initialized any key before adding any addition: Python 1 2 3 4 5 6 7 8 9 10 11 from collections import Counter #make a counter object counter = Counter () #make a string word = 'horror' #loop over the letters in the string and add to the counter for letter in word : counter [ letter ] += 1 #print the value of key "r" print ( counter [ 'r' ] ) 1 2 3 4 from collections import Counter counter = Counter ( "horror" ) key = 's' print ( key , counter [ key ] ) s 0 , because s appears zero times in horror Python 1 2 3 4 5 6 from collections import Counter counter = Counter ( 'horror' ) key = 's' print ( "Before:" , key , counter [ key ] ) counter...
Comments
Post a Comment