• 2022-06-01
    以下哪个路径是相对路径?
    A: ./test.py
    B: C:\test.py
    C: C:\Windows\test.py
    D: C:\Windows\System32\test.py
  • A

    内容

    • 0

      执行语句print(“c:\\test.py”)的输出结果是。

    • 1

      在test.py中定义了函数add:defadd(a,b):returna+b其他文件导入test模块,导入方式为importtest,则调用add函数如何调用? A: add(a,b) B: test.add(a,b) C: (a,b) D: test->add(a,b)

    • 2

      在/home/user目录中有一个程序文件test.py, 如果我们正在运行test.py程序,下列哪个说法错误? A: 程序文件的绝对路径是'/home/user/test.py' B: 当前的工作目录是'/home/user', 也可写作'.' C: '/home/user'是一个文件夹 D: 上级目录'..'代表'/home/user/'

    • 3

      使用open()打开一个windows操作系统D盘下的文件,以下选项中对路径的表示是错误的是: A: “D:\test\abc.txt” B: r“D:est” C: “D:/test/abc.txt” D: “D:\test\”

    • 4

      以下哪个JSON格式是正确的: A: {"test":"hello"} B: ["test":"hello"] C: {"test":"hello":"world"} D: {"test"}