中国大学MOOC: 由字符串 s = hello world 获得 Hello World 的方法为?
s.title()
举一反三
- 由字符串 s = hello world 获得 Hello World 的方法为?
- 由字符串 s = 'hello world' 获得 'Hello World' 的方法为? A: s.title() B: s.capitalize() C: s.upper() D: s.isupper()
- 由字符串 s = 'hello world' 获得 'Hello World' 的方法为? A: s.title() B: s.capitalize() C: s.upper() D: s.isupper()
- 若字符串 s = 'hello world',则语句 s.ljust(15, '.') 和 s.rjust(15) 的输出结果为? A: '....hello world'' hello world' B: 'hello world....'' hello world' C: 'hello world....''hello world ' D: 'hello world....''hello world'
- 给定字符串s=hello world,获取hello的切片表达式为________。
内容
- 0
以下程序段的输出结果是 。Char s[ ]=”Hello World!”;Strlwr(s);Printf(“%s”,s); A: hello world! B: HELLO world! C: hello WORLD! D: HELLO WORLD!
- 1
for s in "hello world": A: hello world B: world C: hello D: helloworld
- 2
中国大学MOOC: 设有一个字符串s赋值如下: String s=hello;要获得字符串中的首个字符构成的子串可以用哪些方法?
- 3
执行下列代码后,新字符串中的结果是() A: HELLO WORLD! B: Hello World! C: HELLO WORLD1 D: hELLO wORLD!
- 4
中国大学MOOC: 观察本章的“Hello world”C程序,打印“Hello world”用的函数为_____________。