In: Computer Science
create a Python script that prompts the user for a title, description, and filename of your Python program and add the following to the bottom of the existing homepage:
Code:
Output:
Raw code:
# taking inputs from the user
title = input("Enter Title: ")
description = input("Enter Description: ")
filename = input("Enter file name: ")
file = open("home.html","a") # opening a file in append mode
assignment_file = "assignment.html" # Web Showcase assignment filename
# writing into file
file.write(f"<em>{title}</em>\n") # adding title
file.write(f"<p>{description}</p>\n") # adding description
file.write(f"<a href=./{filename}>File</a><br>\n") # adding hyperlink link
file.write(f"<a href=./{assignment_file}>Assignment</a><br>\n") # adding another hyperlink link
NOTE:
If You Have Any Doubts Feel Free To Comment In The
Comment Section.
Do Vote (LIKE).