Summary of key points:
- Input/output method, input (), print () method
- List is an ordered collection of elements that can be added and removed at any time.
- Conditional Statement If-else Application
#! /usr/bin/Pythonname= Input ('Please enter your name:') Address= Input ('Please enter your address:') Gender= Input ('Please enter your gender:') Info=[Name, address, gender]info_len=len (info) print ('\ n------------------------------------------------------------------\ n') Print ('you have entered', Info_len,'information, respectively:') Print ('Name:', info[0]) print ('Address:', info[1]) print ('Gender:', info[2]) print ('\ n------------------------------------------------------------------\ n') age_conf= Input ('is it convenient for you to tell us your bank deposit (y/n)?') Age_unicode=Ord (age_conf)ifAge_unicode = =121or Age_unicode = = the: Money=int(Input ('So, how much do you have in your bank account? ')) Info.append (money)ifMoney >=10000: Print ('\ n Respect.', info[0],'Hello, your personal information is:', info) print ('in view of your so rich, in order to prevent the thief to stare, quickly delete some of your information it \ n') Delno= Input ('Delete name Please press 0, delete address please press 1, delete sex Please press 2, delete deposit please press 3\n Please select:') Del_int=int(delno) print ('you want to delete the', Info[del_int]) cont= Input ('Are you sure you want to delete it? (y/n)') Cont_unicode=Ord (cont)ifCont_unicode = =121or Cont_unicode = = the: Info.pop (del_int) print ('The information you have selected has been deleted! Now the remaining information is \ n', info)Else: Print (Info[del_int],'The information is not deleted and the current information is still', info)Else: Print ('just', Money,'Block Money ... Don't pull it off, just pay the rent, or you'll sleep on the street! ')Else: Print ('forget, don't tell pull to, with I have not half gross money relationship! ')
Python Script Instance 001