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
inessss [21]
4 years ago
8

Which shape would the code circle (100, steps=4) draw?

Computers and Technology
1 answer:
ozzi4 years ago
5 0

Square shape have the code circle (100, steps=4) draw.

A. square

<u>Explanation:</u>

This circle function code is done in Python. The circle function is available in turtle module. In python  turtle module is used  for graphics. We have to import turtle module in IDLE and call the function Turtle() to open the turtle graphics screen.

Then we can call the function circle() which takes 100 as radius and step size as parameter into the function and  resulting in drawing a square of 100 radius. The square is drawn tilted due to the movement of the turtle(the arrow head).

You might be interested in
The natural language convention used to represent ip addresses is called the:
Katyanochek1 [597]

is there multiple choice options? we need those to be exact..

6 0
4 years ago
Write a method that computes the sum of the digits in an integer. Use the following method header: public static int sumDigits(l
kifflom [539]

Answer:

The java program for the given scenario is shown below.

import java.util.*;

import java.lang.*;

public class Test

{

   //variables to hold the number, digits and sum of the digits

   //variable to hold number is assigned any random value

   static long num=123;

   static int sum=0;

   static int digit;

   static int s;

   //method to add digits of a number

   public static int sumDigits(long n)

   { do

       {

           digit=(int) (n%10);

           sum=sum+digit;

           n=n/10;

       }while(n>0);

       return sum;

   }

public static void main(String[] args) {

    s = sumDigits(num);

 System.out.println("The sum of the digits of "+num+ " is "+s);  }

}

OUTPUT

The sum of the digits of 123 is 6

Explanation:

1. The variables to hold the number is declared as long and initialized.

2. The variables to store the digits of the number and the sum of the digits are declared as integer. The variable, sum, is initialized to 0.

3. The method, sumDigits(), is defined which takes a long parameter and returns an integer value. The method takes the number as a parameter and returns the sum of its digits.

4. Inside method, sumDigits(), inside the do-while loop, the sum of the digits of the parameter is computed.

5. Inside main(), the method, sumDigits(), is called. The integer value returned by this method is stored in another integer variable, s.

6. The sum of the digits is then displayed to the console.

7. All the variables are declared outside main() and at the class level and hence declared static. The method, sumDigits(), is also declared static since it is to be called inside main().

8. In java, the whole code is written inside a class since java is a purely object-oriented language.

9. In this program, object of the class is not created since only a single class is involved having main() method.

10. The program can be tested for any value of the variable, num.

11. The file is saved as Test.java, where Test is the name of the class having main() method.

7 0
3 years ago
You can not give an exact size for a height for column width true or false
GalinKa [24]

Answer:

~false~

Explanation:

5 0
3 years ago
Which element is included in the shot breakdown storyboard? Which element is included in the shot breakdown storyboard?
VladimirAG [237]

Answer: jump out

Explanation:

Took the test and it was correct

5 0
3 years ago
How do u get rid of this (the grey box)
slamgirl [31]

Answer:

can't helpnyounddjdjzjzjsjejs jvm d

8 0
4 years ago
Read 2 more answers
Other questions:
  • What environmental concern will hybrid cars address?
    6·2 answers
  • P**nhub or x-videos or other
    9·1 answer
  • Write and run a Python program that asks the user for a temperature in Celsius and converts and outputs the temperature in Fahre
    10·1 answer
  • Can y’all help me with these questions ?
    5·1 answer
  • Use HTML to create a web page
    10·1 answer
  • All of the Internet in your country disappears. What happens next?
    13·1 answer
  • Sara Beth and Taylor have developed a new software that they plan to distribute for free, allowing other software professionals
    7·1 answer
  • . How is using 0 / 1 or true / false in specifying digital an abstraction?
    11·1 answer
  • A program that organizes sequences of automated provisioning tasks. A. Application Packager B. Sequence Manager C. Sequence Logg
    14·1 answer
  • What's the commission payout for auto bill pay if sold with a ga?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!