<jupyter_start><jupyter_text>1. Write a shutting down program:a. First, def a function, shut_down, that takes one argument from the keyboard.b. Then, if the shut_down function receives an argument equal to "yes", it should return "Shutting down".c. Alternatively, elif argument is equal to "no", then the function should return "Shutdown aborted".d. Finally, if shut_down gets anything other than those inputs, the function should return "Sorry, such argument not welcome here ".<jupyter_code>def shut_down(x):
    if "yes" == x:
        return "Shutting down."
    elif "no" == x:
        return "Shutdown aborted"
    else:
        return "Sorry, such arguement not welcome here"
print(shut_down(input("Should i shut down")))<jupyter_output>Should i shut downyes
Shutting down.<jupyter_text>> 2. Create a function **showEmployee()** in such a way that it should accept a given number of employee name and salary as input, stores the data in a dictionary, and then save it into a csv file, if any of the following condition is met. >    a. If the salary is greater than **N1,000,000** display employ name and salary in **green color**. >    b. If the salary is greater than **N500,000** and less than N1,000,000 dispaly both employee name and salary in **blue color**. >    c. If the salary is less than **N500,000** dispaly both employee name and salary in red color.If the salary is missing in the function call display the message **"Warning: No salary structure for employee"** in **red color**.<jupyter_code>def showEmployee(x,y):<jupyter_output><empty_output><jupyter_text>3. Follow the stpes:a. First, def a function called cube that takes an argument called number.b. Make that function return the cube of that number (i.e. that number multiplied by itself and multiplied by itself once again).c. Define a second function called by_three that takes an argument called number. if that number is divisible by 3, by_three should call cube(number) and return its result. Otherwise, by_three should return False. -Check if it works.<jupyter_code>def cube(number):
    cube = number**3 
    return cube


print(cube(float(input("Enter number:"))))
def by_three(number):
    if number % 3==0:
         return cube(number)
    else:
         return False
by_three(float(input("Enter number:")))<jupyter_output>Enter number:9<jupyter_text>4.Write a Python function that accepts a string and calculate the number of upper case letters and lower case letters.<jupyter_code>def string_test(s):
    d={"UPPER_CASE":0, "LOWER_CASE":0}
    for c in s:
        if c.isupper():
           d["UPPER_CASE"]+=1
        elif c.islower():
           d["LOWER_CASE"]+=1
        else:
           pass
    print ("Original String : ", s)
    print ("No. of Upper case characters : ", d["UPPER_CASE"])
    print ("No. of Lower case Characters : ", d["LOWER_CASE"])
string_test(str(input("Enter a string")))<jupyter_output>Enter a stringI am A boy
Original String :  I am A boy
No. of Upper case characters :  2
No. of Lower case Characters :  5
{'fraction_non_alphanumeric': 0.09514370664023786, 'fraction_numerical': 0.013544763792533861, 'mean_word_length': 3.988467874794069, 'pattern_counts': {'":': 2, '<': 14, '<?xml version=': 0, '>': 18, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '282779', 'license': 'MIT', 'n_tokens_mistral': 902, 'n_tokens_neox': 866, 'n_words': 388, 'path': 'Functions lab practice.ipynb', 'repo_name': 'kody-ban/Kody_CSC102', 'size': '3027'}