Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer both parts. I am posting this again because it was not answered completely the first time. Let me know if there are any

image text in transcribed

Please answer both parts. I am posting this again because it was not answered completely the first time. Let me know if there are any questions.

c. Write a program that prompts the user to enter a string message of their choosing. The program should read this string and then output the source code for a program that will print the user's message when it is executed. So, if the user entered "Eat at Joe's" then your program would print out the source code for a program that prints out "Eat at Joe's". d. Write a program that opens and reads its own source code file and prints out the total number of lines. So, if your program's source code was in a file named prog4.py then it would open and read prog4.py and count the total number of lines which it then prints as output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions