• 2022-06-09
    ‌以下程序的输出结果是:( )‏‌fo = open("text.txt",'w+')‏‌x,y ='this is a test','hello'‏‌fo.write('{}+{}\n'.format(x,y))‏‌print(fo.read())‏‌fo.close()‏‌‏
    A: this is a test hello
    B: this is a test
    C: this is a test,hello.
    D: this is a test+hello
  • D

    内容

    • 0

      以下程序输出到文件textcsv里的结果是: fo = open(“textcsv”,‘w’) x = [90,87,93] z = [] for y in x: z.append(str(y)) fo.write(","join(z)) fo.close()

    • 1

      有以下python代码:str = 'Hello World!'print str + "TEST" 它的结果是输出连接的字符串

    • 2

      下面的程序执行后,文件test中的内容是()。voidfun(char*fnam...n("test","hello,");}

    • 3

      有如下程序:#includeusing namespace std;Class Testpublic:Test()Test(const Test&t)cout<<1;);Test fun(Test &u)Test t=u;retum t;int main()Test X,y;x=fun(y);retum 0;运行这个程序的输出结果是()。 A: 无输出 B: 1 C: 11 D: 111

    • 4

      以下程序的输出结果,可能的选项是______。 ‪‪‪‪‪‪‪‪‪‪‪‫‪‪‪‪‪‫‫‪‪‪‪‪‪‪‪‪‪‪‪‫‪‪‪‪‪‪‪import random def test(): x = random.randint(0,10) y = random.randint(10,20) return(&#91;x,y&#93;) print(test())