f = input("Name the text file: ")
file = open(f+".txt", "w")
lastName = input("Enter the name: ")
hourWage = str(input("Enter the hourly wage: "))
hourWorked = str(input("Enter the worked hours: "))
for line in file:
file.close()
这是错误代码:
对于文件中的行:
不支持操作:不可读
Tags:
假设您正在将}写入文本文件,下面是操作方法:
lastName
、hourWage
和{输出:
^{pr2}$要添加任意数量的输入,请添加
while
循环:输出:
^{4}$相关问题 更多 >
编程相关推荐