题库首页 › 青少年软件编程(Python) › 题目 15745

阅读以下代码,描述错误的选项是?( ) import wordcloud txt="Nothing is impossible!" w=wordcloud.WordCloud(background_color="white") w.generate(txt) w.to_file('px.png')

A:wordcloud.WordCloud()代表一个文本对应的词云
B:w.generate(txt)为向WordCloud对象中加载文本txt
C:w.to_file(filename)将词云输出为图像文件,只能输出为.png格式
D:background_color指定词云图片的背景颜色,默认为黑色

正确答案:C

试卷来源:202412 青少年软件编程等级考试Python五级真题

本卷相关题目

在线做题 同科目题库