Home > other >  Can you excuse me this simple Python topic, just start learning Python
Can you excuse me this simple Python topic, just start learning Python

Time:09-19

Trouble to see the second and the third question, thank you

CodePudding user response:

 
For j in range (3) :
Stu [I] [2]. Append (input (' the first % d input a result '% (j + 1)))
Def output_stu (stu) :
For I in range (N) :
Print (' % - 6 s % - 10 s' % (stu [I] [0], stu [I] [1]))
For j in range (3) :
Print (' % - 8 d % stu [I] [2] [j])

CodePudding user response:

 

N=5
Student=[]
For I in range (5) :
Student. Append (" ", "", []])
Def input_stu (stu) :
For I in range (N) :
Stu [I] [0]=input (' student id ')
Stu [I] [1]=input (' name ')
For j in range (3) :
Stu [I] [2]. Append (input (' the first % d input a result '% (j + 1)))
Def output_stu (stu) :
For I in range (N) :
Print (' % - 6 s % - 10 s' % (stu [I] [0], stu [I] [1]))
For j in range (3) :
Print (' % - 8 d % int (stu [I] [2] [j]))
Def the main () :
Input_stu (student)
Output_stu (student)
The main ()

CodePudding user response:

 

Def the main () :
Filename=input (' input file name \ n ')


Fp=open (filename, 'w')
Ch=""

While "#!" "=ch:

Fp. Write (ch)
Ch=input (' input string: \ n ')
Fp. Close ()
The main ()

CodePudding user response:

The
reference 3 floor weixin_45903952 response:
 

Def the main () :
Filename=input (' input file name \ n ')


Fp=open (filename, 'w')
Ch=""

While "#!" "=ch:

Fp. Write (ch)
Ch=input (' input string: \ n ')
Fp. Close ()
The main ()

Thank you, hard
  • Related