<jupyter_start><jupyter_text>Exercise 1<jupyter_code>user = input("Do you want to shutdown your system?  ")


def shut_down():
    if user == "yes":
        print("Shutting down...  ")
    elif user == "no":
        print("Shutdown aborted  ")
    else:
        print("Sorry, such argument not welcome here  ")
        
shut_down()<jupyter_output>Do you want to shutdown your system?  yes
Shutting down...<jupyter_text>Exercise 2<jupyter_code>import colorama
from colorama import Fore, Style
import pandas as pd
import csv

def showEmployee(c):
    m = 0
    while m < c:
        n = input("enter name: ")
        s = int(input("Ënter salary: "))
        x = {}
        if (s>1000000):
            print(Fore.GREEN + "Name: ", n)
            print("Salary: ", s)
        elif (s > 500000) & (s < 1000000):
            print(Fore.BLUE + "Name: ", n)
            print("Salary: ",s)
        else:
            print(Fore.RED + "No salary structure for Employee")
        
        field_names = ["No", "Name","Salary"]
        x = [{"No":m,"Name":n, "Salary":s}]
        
        with open("Names.csv", "w") as csvfile:
            writer = csv.DictWriter(csvfile, fieldnames = field_names)
            writer.writeheader()
            writer.writerows(x)
        m += 1
c = int(input("Enter number of Employees: "))

showEmployee()<jupyter_output><empty_output><jupyter_text>Exercise 3<jupyter_code>def cube(number):
    print(number * number * number)

cube(int(input("What is the number you want to cube?  ")))

def by_three(number):
    if number % 3 == 0:
        cube(number)
    else:
        return "False"
by_three(int(input("What is the number?  ")))<jupyter_output>What is the number you want to cube?  23
12167
What is the number?  12
1728<jupyter_text>Exercise 4<jupyter_code>def calculate(string):
    
    count1 = 0
    count2 = 0
    
    for letter in string:
        if letter.islower():
            count1 = count1+1
        elif letter.isupper():
            count2 = count2+1
    print("The number of lowercase characters is: ",count1)
    print("The number of uppercase characters is: ",count2 )

calculate(input("Enter string:"))<jupyter_output>Enter string:JKHGqwerty
The number of lowercase characters is:  6
The number of uppercase characters is:  4
{'fraction_non_alphanumeric': 0.12323943661971831, 'fraction_numerical': 0.02420774647887324, 'mean_word_length': 2.6368, 'pattern_counts': {'":': 5, '<': 16, '<?xml version=': 0, '>': 16, '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': '98678', 'license': 'MIT', 'n_tokens_mistral': 793, 'n_tokens_neox': 740, 'n_words': 206, 'path': 'Lab exercise 5.ipynb', 'repo_name': 'bigdaddyjeff/JeffreyCSC102', 'size': '2272'}