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
Tcecarenko [31]
3 years ago
5

Can someone help me with this ?

Computers and Technology
1 answer:
SVEN [57.7K]3 years ago
5 0

Answer:

I assume you want to set the opacity (0-100) depending on the mouse's coordinate on the screen. The variables indicating the mouse's coordinates are <em>mouseX</em> and <em>mouseY</em>.

To achieve this, you will need to divide the mouseX/mouseY (whichever you choose) by 4 to what's called "normalize" it. If your mouse was at 320 for example... Dividing it by four would give you 80, and this works because the bounds that the opacity can be set to is 0-100.

normalized = mouseX / 4

Circle(mouseX, mouseY, 50, fill='navy', opacity=normalized)

...or if you want to do it in one line...

Circle(mouseX, mouseY, 50, fill='navy', opacity=mouseX / 4)

You might be interested in
Copyright laws were established :A. to allow authors to distribute their work while maintaining certain ownership rights. B. to
astra-53 [7]

Answer:A

Explanation:

Copy right is an intellectual property right granted by the government that gives the owner exclusive rights to use, with some limited exception, original expressive work.

3 0
4 years ago
Write a method that returns a new array by eliminating the duplicate values in the array using the following method header: Publ
saw5 [17]

Answer:

Following are the program in java language

import java.util.*; // import package

class Main // main class

{

public static void main(String[] args) // main method

{

Scanner sc = new Scanner(System.in); // creating Scanner class object

int[] num= new int[10]; // declaring the array num

System.out.print("Enter 10 numbers:: ");

for (int i = 0; i < num.length; i++) // iterating over the loop

{

num[i] = sc.nextInt(); // taking 10 input integer.....

}

int[] newList1 = eliminateDuplicates(num);// calling the function eliminateDuplicates

System.out.println("The Distinct numbers are: ");

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

{

System.out.print(" " +newList1[i]); // display the new list

}

System.out.println();

}

public static int[] eliminateDuplicates(int[] list) // method definition as mention in question

{

int[] duplicate1 = new int[10]; // creating the array duplicate

int j = 0, I = 0; // variabe declaration

for (int i = 0; i < list.length; i++) // filling the duplicate with 0

{

duplicate1[i] = 0;

}

int count1 = 0; // variable declaration

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

{

boolean duplicate = false; // creating boolean variable

for(j = 0; j < count1; j++) // iterating over the loop

if(list[i] == duplicate1[j]) // checking the condition

{

duplicate = true; // assigning the duplicate variable to true

break;

}

if(!duplicate) //checking boolean variable duplicate

{

duplicate1[count1] = list[i];

count1++;

}

}

int [] newArray1 = new int[count1]; // creating a new array

for(int i = 0; i < count1; i++) // iterating over the loop

newArray1[i] = duplicate1[i]; // assign the element in the new array

return newArray1; // return array

}

}

Output:

Enter 10 numbers:::1

2

3

2

1

6

3

4

5

2

The Distinct numbers are:1 2 3 6 4 5

Explanation:

In this program we create a eliminateDuplicate method and passing array to them.In this function we create a duplicate array and assign 0 to them by iterating over  the loop then we check the required condition is duplicate or not by making comparison between the duplicate array and list array i.e if(list[i] == duplicate1[j]) . if matches found then it set duplicate = true; .Finally it created a new array and store the distinct element also return the new array element.  In the main method it printed the distinct elements .

7 0
3 years ago
Your company collects and stores security camera footage. Within the first 30 days, footage is processed regularly for threat de
Sliva [168]

Answer:

<em>For the very first 30 days, use Google Cloud Regional Storage, then switch to Coldline Storage.</em>

Explanation:

Coldline Storage is a cost-effective, extremely durable information archiving, online backup, and disaster recovery web host.

Your information is available in seconds, not hours or days, unlike many other "cold" storage providers.

5 0
4 years ago
Choose an ethical person you admire. This could be someone you know (such as a parent, friend, or teacher) or someone you don’t
Andrews [41]
HEY THERE!!

I will chose my sister though we have not blood relation but then she is my ideal . i love her so much and i respect her a lot , much more then a real sister . She is everything to me. She guides me in my study amd after meeting her i am completely changed.

I m an INDIAN and she is an Pakistani i met up with her in brainky amd now i don't wanna loss her ever.

Love you sis .
8 0
4 years ago
Assume that name is a variable of type String that has been assigned a value. Write an expression whose value is the first chara
Nostrana [21]

Answer:

char firstLeter = name.charAt(0);

Explanation:

Consider the program below:

public class num2 {

   public static void main(String[] args) {

     String name = "Smith";

     char firstLetter = name.charAt(0);

       System.out.println(firstLetter);

   }

}

In this program, A string name is defined and assigned the value "Smith".

Java's String method charAt() is called and passed the argument of index 0. This causes it to output the character S. Since this is the first letter in the String is at index 0.

5 0
3 years ago
Other questions:
  • .exe, .msi, .msp, .inf - together, what do these filetypes indicate
    12·2 answers
  • Excel has more than 400 additional functions that perform just about every type of calculation you can imagine. Answer
    6·1 answer
  • . Does Zuckerberg believe in the thought that “the endpoint is when you sell the
    15·1 answer
  • Assume you're running a query on your orders in the past year. You want to see how many orders were placed after May. What type
    5·1 answer
  • With what information should you provide your support technician if you encounter an error message? the error text and code the
    13·2 answers
  • A triangle is an example of __________ .
    9·1 answer
  • Which cable would you check if you can't access any web pages?
    12·1 answer
  • 2ND LAST QUESTION
    13·1 answer
  • Việc áp dụng khai báo hải quan điện tử có áp dụng chữ ký số, đem lại những lợi ích gì
    10·1 answer
  • Enter a formula in cell C13 to look up the registration fee for the first vehicle. Use the vehicle type in cell C4 as the Lookup
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!