网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
完善下面的程序,实现太阳花的绘制。 import turtle turtle.color("red","yellow") turtle.begin_fill() for i ___________ turtle.fd(200) turtle.left(170) turtle.end_fill()
参考答案和解析
请保存运行成功后截图
更多 “完善下面的程序,实现太阳花的绘制。 import turtle turtle.color("red","yellow") turtle.begin_fill() for i ___________ turtle.fd(200) turtle.left(170) turtle.end_fill()” 相关考题
考题
设有说明var color:(red,green,yellow,blue);a:boolean;下面语句正确的是( )。
Aolor:=‘green‘;Bwriteln(green);Cwriteln(color);Da:=color=red;
考题
在下列程序段中,enumcolor{red,yellow,blue=4,green,white}c1,c2;c1=yellow;c2=white;枚举变量c2的值是()
A、1B、3C、5D、6
考题
( 18 )下列枚举类型的定义中,包含枚举值 3 的是A ) enum test {RED, YELLOW, BLUE, BLACK};B ) enum test {RED, YELLOW=4, BLUE, BLACK};C ) enum test {RED=-1, YELLOW,BLUE, BLACK};D ) enum test {RED, YELLOW=6, BLUE, BLACK};
考题
Restricted areas at locks and dams are indicated by ______.A.flashing red lights upstream and fixed red lights downstremB.yellow unlighted buoysC.signs and / or flashing red lightsD.red daymarks upstream and green daymarks downstream
考题
将下面的程序补充完整。注意:不改动程序结构,不得增行或删行。import java.appplet.Applet;import java.awt.Graphics;public class ex1 extends Applet{public void paint(Graphics______){int i=682;gap.drawstring(Integer.______(i),20,60);}}
考题
下列枚举类型的定义中,包含枚举值3的是A.enum test{RED,YELLOW,BLUE,BLACK};B.enum test{RED,YELLOW=4,BLUE,BLACK};C.enum test{RED=-1,YELLOW,BLUE,BLACK};D.erium test{RED,YELLOW=6,BLUE,BLACK};
考题
3下面的程序是完成一个容器的例子,所缺部分正确的选项是( )。 import java.awt.*; public class MyFrame. extends Frame{ public static void main(String args[]) { MyFrame. fr=new MyFrame("Hello Out There!"); fr.setSize(200,200); fr.setBackground(Color.red); _______; } public MyFrame(String str){ super(str); //调用你类的构造方法 } }A.fr. setVisible(false)B.fr. setVisibleC.fr. setVisible(true)D.以上都不是
考题
本题的功能是用按钮来控制文字的颜色。窗口中有三个按钮“Yellow”、“Blue”和“Red”,它们分别对应文字标签中文本的颜色为黄色、蓝色和红色,单击任意一个按钮,文字标签中的文本就变成按钮对应的颜色。 import java.awt.*; import java.awt.event.*; import javflx.swing.*; class ButtonPanel extends JPanel implements ActionL- istener{ public ButtonPanel{ yellowButton=new J Button("Yellow"); blueButton=new JButton("Blue"); redButton=new JButton("Red"); j1=new JLabel("I am from China!"); add(yellowButton); add(blueButton); add(redButton); add(j1); yellowButtofl.addActionListener(this); blueButton.addActionListener(this); redButton.addActionListener(this); } public void actionPerformed(ActionEvent evt){ 0bject source=evt.getSource; Color color=getForeground; if(source= =yellowButton)color=Color. yellow; else if(source= =blueButton)color=Color. blue; else if(source= =redButton)color= Color.red; ; ; } private JButton yellowButton; private JButton blueButton; private JButton redButton; private JLabel jl; } class ButtonFrame. extends JFrame{ public ButtonFrame{ setTitle("exam l6"); setSize(300,200); addWindowListener(new WindowAdapter{ public void windowClosing(WindowEvent e){ System.exit(O); } }); Container contentPane=getContentPane; contentPane.add(new ButtonPanel); } } public class java2{ public static void main(String[]args){ JFrame. frame=new ButtonFrame; frame.show; } }
考题
下列Applet在坐标(30,50)处以黄色字体显示“你好!”。请选择正确的语句填入横线处。 import java.awt.*; import java.applet.*; public class ex27 extends Applet { public void paint<Graphics g) { g.drawString("你好", 30, 50); } }A.setColor(Color.yellow);B.g.setColor(Color. Yellow),C.g.setFontColor(Color. yellow);D.g.setColor(Color. yellow);
考题
WhichofthefollowingisthecorrectwiringorderforanRJ-11twolinejack?()
A.Black,Green,Red,YellowB.Black,Red,Green,YellowC.Red,Black,Green,YellowD.Yellow,Red,Green,Black
考题
在下列程序段中,枚举变量 c1的值是()。enum color { red,yellow,blue=4,green,white}c1; c1=yellow; c1=white;A 1B 3C 5D 6
考题
A light used to signal passing intentions must be an ______.A.all-round yellow light onlyB.all-round white light onlyC.all-round blue light onlyD.alternating red and yellow light
考题
A special daymark is a ______.A.red-and-white octagonB.daymark with a yellow stripe on itC.green squareD.yellow diamond
考题
在列表:c=["black","red","green","yellow","orange","blue"]中,设定变量j=3,那么运行代码turtle.pencolor(c[j])后,画笔的颜色将变成黄色。
考题
我们设计程序时,尤其在绘制图形时,经常需要暂停一下程序,如暂停2秒,我们可以使用以下的代码()。A、time.clear(2)B、turtle.clear(2)C、time.sleep(2)D、turtle.sleep(2)
考题
Which of the following is the correct wiring order for an RJ-11 two line jack?()A、Black,Green,Red,YellowB、Black,Red,Green,YellowC、Red,Black,Green,YellowD、Yellow,Red,Green,Black
考题
单选题以下关于turtle库的描述,正确的是()。A
在import turtle之后就可以用circle()语句,来画一个圆圈B
要用from turtle import turtle来导入所有的库函数C
home()函数设置当前画笔位置到原点,朝向东D
seth(x)是setheading(x)函数的别名,让画笔向前移动x
考题
判断题在列表:c=["black","red","green","yellow","orange","blue"]中,设定变量j=3,那么运行代码turtle.pencolor(c[j])后,画笔的颜色将变成黄色。A
对B
错
考题
单选题What indicates a dual purpose buoy? ()A
Red buoy with a horizontal yellow bandB
Red and white vertically-striped buoy with a vertical yellow stripeC
Red and white vertically-striped buoy with a red spherical topmarkD
Green buoy with a yellow square
考题
单选题You have berthed in a area with other tank vessels. What signal is displayed by a vessel to indicate it is transferring flammable or combustible liquid cargo?().A
A flashing yellow lightB
A red light visible all around the horizonC
A green light visible all around the horizonD
An illuminated red and yellow caution flag
考题
单选题有以下程序:#include main(){ char b[4][10]; int i; for(i=0;i4;i++) scanf(%s,b[i]); printf(%s%s%s%s,b[0],b[1],b[2],b[3]);}执行时若输入:Fig flower is red.回车则输出结果是( )。A
Figflowerisred.B
Figflowefis red.C
Figflower is red.D
Fig flower is red.
考题
单选题A yellow buoy may exhibit a(n)().A
fixed red lightB
flashing lightC
white lightD
occulting light
考题
单选题A light used to signal passing intentions must be an().A
alternating red and yellow lightB
alternating white and yellow lightC
all-round white or yellow lightD
all-round white light only
考题
单选题A light used to signal passing intentions must be an ().A
all-round yellow light onlyB
all-round white light onlyC
all-round blue light onlyD
alternating red and yellow light
热门标签
最新试卷