1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
taurus [48]
3 years ago
10

What is wrong in this python code import turtle bot = turtle.Turtle step = (50) turnAngle = (90) bot.Color("blue") bot.Begin_fil

l() bot.Forward(step) bot.Right(turnAngle) bot.Forward(step) bot.Right(turnAngle) bot.Forward(step) bot.Right(turnAngle) bot.Forward(step) bot.Right(turnAngle) bot.End_fill()
Computers and Technology
1 answer:
Mariana [72]3 years ago
8 0

Answer:

The "Turtle" is a method and should be declared with parenthesis and every other method in the code (except the Turtle() ) should begin with lowercase letters like right, forward and begin_fill. The python file should not be saved as turtle.py to avoid import error.

Explanation:

The python turtle module is a graphical programming package created to introduce programming to children. It has several classes and methods to manipulate objects on the screen.

import turtle  

bot = turtle.Turtle()  

step =(50)  

turnAngle =90  

bot.color("blue")  

bot.begin_fill()  

bot.forward(step)  

bot.right(turnAngle)  

bot.forward(step)  

bot.right(turnAngle)  

bot.forward(step)  

bot.right(turnAngle)  

bot.forward(step)  

bot.right(turnAngle)  

bot.end_fill()

You might be interested in
Consider this data sequence: "3 11 5 5 5 2 4 6 6 7 3 -8". Any value that is the same as the immediately preceding value is consi
Darya [45]

// Variable to keep track of array size

int length = 0;

// Array itself

int array[] = {};

// while loop will take input in the array until a negative number is entered

while(input>=0){

stdin = new Scanner(System.in);

array[length] = stdin;

length +=1;

}

// int variable to terminate while loop

int i =0;

// keep track of index of output array

int y =0;

while(arr[i] != length){

// making output array

int output[]={}; bool flag;

// put the element in out put array considering if it the desired one

output[y] = array [i];

// Now check if it was the desired?

for(int z=1;z<=length;z++){

if(array[i+z]!=output[y]){

 flag = true;

}

else

{

 output[y]=0;

 y+=1;

}

if(array[i+z+1]=output[y] && flag == true){

output[y] = array[i];

y+=1;

}

}

//output the array

for(int o=0;o<y;o++)

System.out.println(output[o];

3 0
4 years ago
Complete the below function which dynamically allocates space to a 3d array of doubles, initializes all values to 0, and returns
MAVERICK [17]

Answer:

Explanation:

1. double ***alloc3dArrayOfInts( int length, int width, int depth) {

2. double ***array3d = malloc(length * sizeof(double **) );

3. for(int i=0; i< length ;i++) {

4. array3d[i] = malloc(width * sizeof(double *) );

5. for(int j=0; j< width;j++) {

6. array3d[i][j] = malloc(depth * sizeof(double) );

7. }

8. }

9. return array3d;

10. }

5 0
3 years ago
Early in the history of technology, the development of tools and machines was based on _____ versus scientific knowledge as is d
Law Incorporation [45]

Answer:

Early in the history of technology, the development of tools and machines was based on technical know-how versus scientific knowledge as is done today.

Explanation:

In the era prior to technological development, men had a basic and at times rudimentary manufacturing development, based on artisan processes that developed their tools and machinery by hand, without any type of automation or mass production rules.

Thus, each part or tool was manufactured in a unique way, which required a broad mastery of the production process by the manufacturer. This is how the first professions began to emerge, such as blacksmiths for example, who mastered the technique of manufacturing different implements and carried them out without any scientific knowledge.

7 0
4 years ago
How does the issue of cybersecurity relate to the internet of things?.
RideAnS [48]

Answer:

Due to the communication of IoTs to the internet, cybersecurity is a great concern when creating and securing that communication.

Explanation:

When connecting devices to the internet, it essentally can be accessed from anywhere. Therefore you would need cyber security to protect each device and its assets from getting into the wrong hands.

Hope this helps :)

5 0
3 years ago
Which of the following statements about functional programming languages is incorrect?A) In pure functional programming, there a
omeli [17]
The answer is (C)
In pure functional programming loops are replaced by recursive calls
3 0
3 years ago
Other questions:
  • What is revision
    13·2 answers
  • Assume:
    14·1 answer
  • The domain name service (dns is a distributed database that allows users to communicate with each other computers by:
    7·1 answer
  • What is a preemptive CPU scheduling algorithm? Give an example and explain.
    7·1 answer
  • Various units used to measure computer memory
    13·1 answer
  • When a called function completes its task, it normally:_________a. logs its results b. terminates program execution normally c.
    5·2 answers
  • Given a MxN matrix.Print the elements in odd rows from left to right and the elements in even rows from right to left.(Java or C
    11·1 answer
  • When we connect to a story, it can be mental, emotional, or even physical. <br> True or False?
    5·1 answer
  • Code a program that gets all possible solutions of a string using 3 for loops. Actual question attached
    11·1 answer
  • The following equations estimate the calories burned when exercising (source):
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!