# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## Q1. Create the below pattern using nested for loop in Python.
#
# <p>
# * <br>
# * * <br>
# * * * <br>
# * * * * <br>
# * * * * * <br>
# * * * * <br>
# * * * <br>
# * * <br>
# * <br>
# </p>

# +
rows=5
#Printing above half
for i in range(rows):
    for j in range(i):
        print('*',end=" ")
    print('\n')
    
#Printing the lower half
for i in range(rows,0,-1):
    for j in range(i):
        print('*',end=" ")
    print("\n")
# -

# ## Q2. Write a Python program to reverse a word after accepting the input from the user.
#
# ### Sample Output:
#
# #### Input word: ineuron
# #### Output: norueni

word=input("Input word:")
print("Output: ",word[::-1])





StarcoderdataJupyterScriptsDedupFiltered