• 2022-06-08
    ‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬给出如下代码‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬
    s
    = 'Python is beautiful!'
    可以输出“python”的是
    A: print(s[0:6])
    B: print(s[0:6].lower())
    C: print(s[–21:
    –14].lower)
    D: print(s[:–14])
  • B

    内容

    • 0

      s="Python is cool",可以输出"python"的是 A: print(s[0:7]) B: print(s[:7].lower()) C: print(s[:-8].lower()) D: print(s[-14:-8])

    • 1

      s=’Python is beautiful! ’ 可以输出“PYTHON”的是 A: print(s[0:7]) B: print(s[0:7].upper()) C: print(s[-21:-14].upper) D: print(s[:-14])

    • 2

      s = " Python", 能够原样显示输出变量s值的选项是: A: print(s[:6]) B: print(s[-1:0]) C: print(s[:]) D: print(s[0:-1])

    • 3

      s = "Python", 能够显示输出Python 的选项是:()。 A: print s[0:-1] B: print s[-1:0] C: print s[:5] D: print s[:]

    • 4

      ‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬给出如下代码‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬<br/>s<br/>= 'Python is Open Source!'<br/>print(s&#91;0:&#93;.upper())<br/>上述代码的输出结果是 A: PYTHON IS<br/>OPEN SOURCE! B: PYTHON C: Python is<br/>Open Source! D: PYTHON IS<br/>OPEN SOURCE