CSC project
CSC project
2. FiLE HANDLING
2.1 Question 4:
Create a text file “intro.txt” in python and ask the user to write
a single lie text by user input .
def program4():
f = open("intro.txt","w")
text = input("Enter the text:")
f.write(text)
f.close()
program4()
OUTPUT:
Enter the text: Python is a programming language.
Question 5