Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am a beginner with Python. I created a HTML blog just fine and am now ask to add an 'addPost' script (Jython). Here is

I am a beginner with Python.

I created a HTML blog just fine and am now ask to add an 'addPost' script (Jython).

Here is an image of my bottleneck...

image text in transcribed
4 def addPost( ) : 5 postTitle = raw input ("Title for this post: ") postDesc = raw input ( "Description for this post: ") postFile = raw input ("Filename: " ) file = open ("c: \\inetpub\\wwwroot\\iisstart. html","a") 9 file. write("""Title: """+postTitle+""""mm) 10 file. write("""

Description: """+postDesc+"""

"mm) 11 file. write(""""""+postFile+""""wj 12 file. close () 10 addPost ( ) Load Program >> file = open(c:inetpubwwwroot isstart.htm","a Invalid syntax. Your code contains at least one syntax error, meaning it is not legal Jython. >>> file = open(c:\\inetpub\\wwwrootuisstart.html","a") The error was: 'clinetpub\\wwwrootulisstart.html' I/O operation failed. I tried to read a file, and couldn't. Are you sure that file exists? If it does exist, did you specify the correct directory/folder?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions