The import XLRD
ExcelFile=XLRD. Open_workbook (r 'test. XLSX')
Sheet=ExcelFile. Sheet_by_name (' Sheet1)
I=[]
X=input (" please enter the specific events:)
Y=int (input (" the teacher asked the number of words: "))
While len (STR) (I) & lt; Y * 1.2:
S=random. Randint (1, 60)
Rows=sheet. Row_values (s)
I.a ppend rows (*)
Print (" * "written self criticism" 8 + + "\ n" + "teacher:")
Print (" I should not be "+ STR (x) +", ", * I)
Print (" teacher, please forgive again!" )
CodePudding user response:
According to your code,print (" I should not have "+ STR (x) +", ", * I)
Change
print (" I should not have "+ STR (x) +", ", I)
Have a try
CodePudding user response:
CodePudding user response:
After this, thank you,CodePudding user response:
Len (STR) (I) - & gt; Len (I)Rows=...
I.a ppend... These two lines and s=... The left