<jupyter_start><jupyter_text>I created a function named "my_function" that takes the input arguments "school" and "admission_rate". Running the function creates the lists "goodschools" and "admissions_rates" and then prints a table of the goodschools list using a pandas data frame. The function then runs a for loop that runs through the goodschools list and for each item in the list prints "goodschools[i] is an ivy league school". The function also runs a while loop that runs through the list and prints "goodschools[i] is the best school" if goodschools[i] is "Dartmouth". Lastly the function appends a school to the goodschools list and appends the school's admissions rate to the admissions_rates list, respectively given by the input arguments supplied. Lastly, the function prints another table of new goodschools list and admissions rates. The function supports strings as input and returns a printout of ivy league schools, followed by the statements "goodschools[i] is an ivy leageu school" for all i, followed by the statement "Dartmouth is the best school," followed by a table of goodschools and admissions_rates.<jupyter_code>import pandas as pd 
def my_function(school, admission_rate):
    
    #create list 
    goodschools = ["Dartmouth","Penn","Cornell","Columbia","Brown","Princeton", "Yale","Harvard"]
    admissions_rates =  [8.7,8.4,10.3,5.5,7.2,5.5,6.3,4.6]
    new_dataframe = pd.DataFrame({
        "ivy league": goodschools})
    
    print(new_dataframe)
    #use for loop to go through all values in list and print and concatenate string
    for x in goodschools:
        print(x + " is an ivy league school")
   
    #use a while loop to to go through all values in list 
    #use embedded if statement to print and concatenate a string for a given value in the list

    i = 0
    while i < len(goodschools):
        if goodschools[i] == "Dartmouth":
            print(goodschools[i] + " is the best school")
        i = i + 1
 
    #append a new school to the list           
    goodschools.append(school)
    admissions_rates.append(admission_rate)
    
    #display the new list 
    new_dataframe = pd.DataFrame({
        "good schools": goodschools,
        "admissions rate": admissions_rates})
    
    print(new_dataframe)
    
    
my_function("Stanford", 5)<jupyter_output>ivy league
0  Dartmouth
1       Penn
2    Cornell
3   Columbia
4      Brown
5  Princeton
6       Yale
7    Harvard
Dartmouth is an ivy league school
Penn is an ivy league school
Cornell is an ivy league school
Columbia is an ivy league school
Brown is an ivy league school
Princeton is an ivy league school
Yale is an ivy league school
Harvard is an ivy league school
Dartmouth is the best school
   admissions rate good schools
0              8.7    Dartmouth
1              8.4         Penn
2             10.3      Cornell
3              5.5     Columbia
4              7.2        Brown
5              5.5    Princeton
6              6.3         Yale
7              4.6      Harvard
8              5.0     Stanford
{'fraction_non_alphanumeric': 0.05800922874093606, 'fraction_numerical': 0.01845748187211602, 'mean_word_length': 2.79375, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '83099', 'license': 'MIT', 'n_tokens_mistral': 895, 'n_tokens_neox': 864, 'n_words': 385, 'path': 'assignments/assignment 1/submissions/abigail_buckley.ipynb', 'repo_name': 'rky19/storytelling-with-data', 'size': '3034'}