<jupyter_start><jupyter_text>Python Assignment 2  Question 1<jupyter_code>1. Create the below pattern using nested for loop in Python.

*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*<jupyter_output><empty_output><jupyter_text>num_of_lines = 9print_char = '*'    for i in range(0, num_of_lines):    if(i < (num_of_lines/2)):        for j in range(0, i+1, 1):            print(print_char, end=' ')    else:        for j in range(num_of_lines, i, -1):            print(print_char, end=' ')    print()<jupyter_code>### Question 2<jupyter_output><empty_output><jupyter_text>2. Write a Python program to reverse a word after accepting the input from the user    Sample Output:    Input word: ineuron    Output: norueni<jupyter_code>word = input('Input word : ')
print ('Output: '+ word[::-1])<jupyter_output>Input word :  ineuron
{'fraction_non_alphanumeric': 0.1440677966101695, 'fraction_numerical': 0.015738498789346248, 'mean_word_length': 3.7528735632183907, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 12, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '530829', 'license': 'MIT', 'n_tokens_mistral': 311, 'n_tokens_neox': 301, 'n_words': 73, 'path': 'Python Assignment 2/python_assignment_2.ipynb', 'repo_name': 'srinivas-86/ML_Assignments', 'size': '826'}