#Create a solution that accepts one integer input representing the index value for any of the string elements in the following list:

#frameworks = ["Django", "Flask", "CherryPy", "Bottle", "Web2Py", "TurboGears"]

Output the string element of the index value entered. 
#Place the solution in a try block and implement an exception of "Error" 
#if an incompatible integer input is provided.


frameworks = ["Django", "Flask", "CherryPy", "Bottle", "Web2Py", "TurboGears"]

#use try block with exception "Error" when index value is not found in list
print(f"Enter Index:" )
index = int(input())
#solution accepts an integer input
#solution outputs the corresponding string value for the integer input


#try-block to determine value
try: 
    print(frameworks[index])
except IndexError: 
    print("Error")

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: