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
Oduvanchick [21]
3 years ago
10

Using Turtle Graphics, write a program that will produce 2 Zs next to each other. It is irrelevant where these Zs appear and wha

t size they are as long as they are produced NEXT to each other.
Computers and Technology
1 answer:
LekaFEV [45]3 years ago
8 0

Answer:

# import the  turtle library

from turtle import *

# create a turtle space

space = Screen()

# create a turtle object

z = Turtle()

 

# create a single Z

z.forward(50)

z.right(120)

z.forward(100)

z.left(120)

z.forward(50)

 

# adjust the turtle position

z.up()

z.left...

Explanation:

You might be interested in
To maintain your body temperature, your body converts chemical potential energy into thermal energy T or F
PilotLPTM [1.2K]
True
This is physics btw
CPE --> TE
4 0
3 years ago
Suppose you have two arrays of ints, arr1 and arr2, each containing ints that are sorted in ascending order. Write a static meth
telo118 [61]
Since both arrays are already sorted, that means that the first int of one of the arrays will be smaller than all the ints that come after it in the same array. We also know that if the first int of arr1 is smaller than the first int of arr2, then by the same logic, the first int of arr1 is smaller than all the ints in arr2 since arr2 is also sorted.

public static int[] merge(int[] arr1, int[] arr2) {
int i = 0; //current index of arr1
int j = 0; //current index of arr2
int[] result = new int[arr1.length+arr2.length]
while(i < arr1.length && j < arr2.length) {
result[i+j] = Math.min(arr1[i], arr2[j]);
if(arr1[i] < arr2[j]) {
i++;
} else {
j++;
}
}
boolean isArr1 = i+1 < arr1.length;
for(int index = isArr1 ? i : j; index < isArr1 ? arr1.length : arr2.length; index++) {
result[i+j+index] = isArr1 ? arr1[index] : arr2[index]
}
return result;
}


So this implementation is kind of confusing, but it's the first way I thought to do it so I ran with it. There is probably an easier way, but that's the beauty of programming.

A quick explanation:

We first loop through the arrays comparing the first elements of each array, adding whichever is the smallest to the result array. Each time we do so, we increment the index value (i or j) for the array that had the smaller number. Now the next time we are comparing the NEXT element in that array to the PREVIOUS element of the other array. We do this until we reach the end of either arr1 or arr2 so that we don't get an out of bounds exception.

The second step in our method is to tack on the remaining integers to the resulting array. We need to do this because when we reach the end of one array, there will still be at least one more integer in the other array. The boolean isArr1 is telling us whether arr1 is the array with leftovers. If so, we loop through the remaining indices of arr1 and add them to the result. Otherwise, we do the same for arr2. All of this is done using ternary operations to determine which array to use, but if we wanted to we could split the code into two for loops using an if statement.


4 0
3 years ago
As data travels further over a wavelength or frequency, what goes down?
LUCKY_DIMON [66]

As data travels further over a wavelength or frequency, the radiation type goes down.

<h3>What is an electromagnetic spectrum?</h3>

An electromagnetic spectrum can be defined as a range of frequencies and wavelengths into which an electromagnetic wave is distributed into.

In Science, the electromagnetic spectrum consist of the following types of energy from highest to lowest frequency and shortest to longest wavelength:

  • Gamma rays
  • X-rays
  • Ultraviolet radiation
  • Visible light
  • Infrared radiation
  • Microwaves
  • Radio waves

In this context, we can infer and logically deduce that as data travels further over a wavelength or frequency within the electromagnetic spectrum, the radiation type goes down.

Read more on electromagnetic spectrum here: brainly.com/question/23423065

#SPJ1

5 0
1 year ago
A researcher is interested in whether working memory is influenced by lack of sleep. The researcher administered a measure of wo
ale4655 [162]

Answer:

Dependent sample t-test

Explanation:

The Dependent sample t-test compares the mean score of measurements in one group to that of another other group. It mainly used when analyzing comparable sample units as it pairs repeatable observations within a time frame.

For example, a researcher administered a measure of working memory to a group of subjects at 8am on Day 1 of the study and then again at 8am on Day 2 of the study, after keeping the subjects awake the entire night.

5 0
3 years ago
Microsoft's Xbox operating system provides Xbox programmers with a set of common standards to use to access controllers, the Kin
ASHA 777 [7]

not be made for Xbox platform.

Hope this helps.

3 0
3 years ago
Other questions:
  • Choosing firm goals for your business
    7·2 answers
  • NEED HELP(10 POINTS) PLEASE HELP MATH
    8·2 answers
  • I need help!!!!
    13·2 answers
  • The accounting department moved its network-attached printer from one side of the office to a more centralized location, making
    11·1 answer
  • What is the name of the file manager in Microsoft Windows. The file manager used in Microsoft Windows is?
    12·2 answers
  • As Juan sat in his biology lab, his instructor was droning on about the techniques of vivisection. Juan kept thinking about the
    5·1 answer
  • Validating the results of a program is important to a. correct runtime errors b. make sure the program solves the original probl
    8·1 answer
  • What could have made you redesign your plan? Select 3 options.
    6·1 answer
  • Identify the correct characteristics of Python tuples. Check all that apply.
    9·1 answer
  • Please help me please please
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!