<jupyter_start><jupyter_text>**Extended Learning Portfolio Ques 2:-** ***By <NAME>*** ***20467876***  **This is a function which is used to get the URL (search_term) :-*****1. The User has to input an item in place of search_term..******2. The function will then return the Webpage of the search_term for the item provided by the user.***--- **WORKING:-**Let's understand the following function using the Amazon URL example...**url** = 'https://www.amazon.com.au'  **template(ultrawide monitor)** =  'https://www.amazon.com.au/s?k=ultrawide+monitor&ref=nb_sb_noss_2' ***After careful analysis we realised that, when we create a function to get url for Search_term:-***---We get, **url** = 'https://www.amazon.com.au/s?k=ultrawide monitor&ref=nb_sb_noss_2'---***This is not a valid url,In the actual URL, We need '+' between ultrawide and monitor***   `replace spaces with a '+' sign`   **So, we will replace '  ' (space) with a '+' sign !**---***So,the result URL will be***:- 'https://www.amazon.com.au/s?k=ultrawide+monitor&ref=nb_sb_noss_2'<jupyter_code>''' This function is used to get_url for
    search_term & template '''

def get_url(search_term, template):

#replace spaces with a (' ', '+') sign  
 search_term = search_term.replace(' ', '+')

 url = template.format(search_term)

 # This will append all the pages of url and add the page code to get query parameter
 url += '&page={}'
 return url<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.162839248434238, 'fraction_numerical': 0.009742519137091163, 'mean_word_length': 4.752, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '492714', 'license': 'MIT', 'n_tokens_mistral': 472, 'n_tokens_neox': 451, 'n_words': 158, 'path': 'ELP_Ques2.ipynb', 'repo_name': 'SanchitaMahajan/ELP.Sem2_2021_20467876', 'size': '1447'}