Question

In: Computer Science

create a Python script that prompts the user for a title, description, and filename of your...

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:

  1. Add the post title with an emphasis
  2. Add the post description beneath the post title
  3. Create a hyperlink to the Python file using the filename input
  4. Create another hyperlink to the page you will create in the Web Showcase assignment

Solutions

Expert Solution

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).


Related Solutions

Write a Flask app in which a Python script prompts the user to enter a string...
Write a Flask app in which a Python script prompts the user to enter a string and then that string, as entered, gets displayed on an otherwise blank HTML file, called output.html. Show the Python/Flask code and the html code of the output.html file, one below the other as part of your answer.
1. Write a program that prompts the user for a filename, then reads that file in...
1. Write a program that prompts the user for a filename, then reads that file in and displays the contents backwards, line by line, and character-by character on each line. You can do this with scalars, but an array is much easier to work with. If the original file is: abcdef ghijkl the output will be: lkjihg fedcba Need Help with this be done in only PERL. Please use "reverse"
Write a script that prompts the user for a pathname of a file or directory and...
Write a script that prompts the user for a pathname of a file or directory and then responds with a description of the item as a file along with what the user's permissions are with respect to it (read, write, execute).
a MATLAB script that: • Prompts the user for - a lower-bound for the plot interval...
a MATLAB script that: • Prompts the user for - a lower-bound for the plot interval and stores it in a variable named Lbound - an upper-bound for the plot interval and stores it in a variable named Ubound, and - the number of points at which a function is to be evaluated to generate a plot of the function over the specified range and stores it in a variable named npoints. • Generates a plot of f(x) = x3...
⦁   Write a Bash script that prompts for user input and reads a string of text...
⦁   Write a Bash script that prompts for user input and reads a string of text from the user. If the user enters a no null (no empty) string, the script should prompt the user to re-enter again the string; otherwise should display the string entered “. ⦁   Given an array of the following four integers (3, 5, 13, 14); write a Bash script to display the second and all elements in the array.    ⦁   Write a short Bas...
Using MATLAB or Octave, Write a script that prompts the user for the coordinates of three...
Using MATLAB or Octave, Write a script that prompts the user for the coordinates of three points A, B, and C, namely (xA, yA), (xB, yB), (xC, yC), forming a triangle, storing each in a variable (for a total of 6 variables). The script should then calculate the centroid G = (xG, yG) using xG = xA+xB+xC 3 and yG = yA+yB+yC 3 , storing each in a variable. Finally, the script should print all four points. Sample output: Enter...
Using MATLAB or Octave, Write a script that prompts the user for a multiplier, storing it...
Using MATLAB or Octave, Write a script that prompts the user for a multiplier, storing it in the variable fMultiplier. The script should them prompt the user for a number, storing it in the variabl fIn. The script should then calculate the product of these two variables, saving the result to another variable fOut, and printing it. The script should then repeat the prompt for fIn, calculation, and output twice more, using the same variable fIn and fOut all three...
Using MATLAB or Octave, Write a script that prompts the user for a minimum and maximum...
Using MATLAB or Octave, Write a script that prompts the user for a minimum and maximum real number, then generates and prints a random number in the requested range. The script should then do the same for an integer range. Sample output: Enter a minimum real value: 0.5 Enter a maximum real value: 30 A random number in the range ( 0.5000, 30.0000 ) is 1.7851 Enter a minimum integer value: -10 Enter a maximum integer value: 20 A random...
Write a bash script that... create new user ./finalProject user if a new user is to...
Write a bash script that... create new user ./finalProject user if a new user is to be created ask for the new users information and use it when creating the new user add a new printer ./finalProject printer ask anything you need in order to create the new printer (I.e. name) permissions ./finalProject permissions ask what document and permissions the user wants restarting the computer ./finalProject restart
Create a Python script in IDLE or Kali Python3 CLI to create the following Python Program:...
Create a Python script in IDLE or Kali Python3 CLI to create the following Python Program: Your program will create a username of your choice using a Kali Linux command "useradd -m mark", then set the password for that user using the Kali Linux Command "echo "mark:10101111" | chpasswd". Then you create a dictionary file using the Kali Linux command "crunch 8 8 01 > mylist.txt" Your python script should crack the password for that user and display on the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT