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 mouseX and mouseY.
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)
create a class named student that has fields for an id number (idnumber), number of credit hours earned (hours), and number of points earned (points). (for example, many schools compute grade point averages based on a scale of 4, so a three-credit-hour class in which a student earns an a is worth 12 points.) include get and set methods for all fields. a student also has a field for grade point average. include a getgradepoint() method to compute the grade point average field by dividing points by credit hours earned. write methods to display the values in each student field, show isnumber(), show hours(), etc.
Here is a sample implementation of the class Student in Python:
The Programclass Student:
def __init__(self, idnumber, hours, points):
self.idnumber = idnumber
self.hours = hours
self.points = points
self.gpa = self.points / self.hours
def get_idnumber(self):
return self.idnumber
def set_idnumber(self, idnumber):
self.idnumber = idnumber
def get_hours(self):
return self.hours
def set_hours(self, hours):
self.hours = hours
self.compute_gpa()
def get_points(self):
return self.points
def set_points(self, points):
self.points = points
self.compute_gpa()
def compute_gpa(self):
self.gpa = self.points / self.hours
def get_gpa(self):
return self.gpa
def show_idnumber(self):
print("ID Number:", self.idnumber)
def show_hours(self):
print("Hours Earned:", self.hours)
def show_points(self):
print("Points Earned:", self.points)
def show_gpa(self):
print("Grade Point Average:", self.gpa)
The Explanation:
You can create an instance of this class as follows:
student = Student(12345, 3, 12)
And access its properties and methods as follows:
print(student.get_idnumber())
student.show_hours()
student.show_gpa()
Read more about python here:
https://brainly.com/question/26497128
#SPJ1
Fictional Corp makes use of ITIL processes and lifecycle management strategies to ensure that they have a good handle on the various stages of creating new applications and retiring them once they are no longer useful. Jason has been tasked with creating a new application to be deployed onto the company's private cloud. Which of the following is the first stage of the process?
a. Deployment
b. Design and development
c. Migration
d. Upgrade
Answer: Design and development
Explanation:
Since Jason has been tasked with creating a new application to be deployed onto the company's private cloud, the first stage of the process is the design and development.
The design and development stage involves gathering of business functions as well as analysing requirements before the application is deployed to the private cloud.
What is the climax of Ralph breaks the internet?
Answer:
As with the real internet, side quests often end up becoming main quests, and Vanellope falls in love with the gritty nature of internet gaming (through Gal Gadot's speed-racer Shank). Ralph Breaks The Internet also ends up going into the dark web and uses that to form the base of the climax of the film.
Explanation:
hope that help thanx
Identify two stages of processing instructions
Answer:
1. Fetch instruction from memory.
2. Decode the instruction.
explain approaches of AI
Answer:
Main AI Approaches
There are three related concepts that have been frequently used in recent years: AI, machine learning, and deep learning.
You have an image of building but there are people standing on the far left side. You would like to remove those people. Which tool do you need ?
Answer:
cropping tool
Explanation:
since the people are on the far left you can just crop the image
In Python, when converting a string value into a numeric value that is a positive or negative whole number, the int() function is used.
True
False
Answer:
True
Explanation:
The Int Variable can handle Positive and Negative Numbers, it just can't handle decimal numbers.
The statement "In Python, when converting a string value into a numeric value that is a positive or negative whole number, the int() function is used" is true.
What is python?Python is a popular computer programming language used to create software and websites, automate processes, and analyze data. Python is a general-purpose language, which means it may be used to make many various types of applications and isn't tailored for any particular issues.
Python is a great programming language for experienced developers as well. It's one of the most widely used programming languages in the world, maybe as a result of how simple it is for novices to learn. Python is one of the most approachable programming languages due of its simple syntax and lack of complexity.
Therefore, the statement is true.
To learn more about python, refer to the link:
https://brainly.com/question/18502436
#SPJ5
which file format would be appropriate for web graphics
Answer:
PNG
Explanation:
PNG files can shrink to incredibly small sizes - especially images that are simple colours, shapes, or text. This makes it the ideal image file type for Web graphics.
Write a program that calculates and displays the amount ofmoney available in a bank account that initially has $8000 deposited in it and that earns interest atthe rate of 2.5 percent a year. Your program should display the amount available at the end of eachyear for a period of 10 years. Use the relationship that the money available at the end of each yearequals the amount of money in the account at the start of the year plus 0.025 times the amountavailable at the start of the year [20 points].
Answer:
Written in Python
import math
principal = 8000
rate = 0.025
for i in range(1, 11):
amount = principal + principal * rate
principal = amount
print("Year "+str(i)+": "+str(round(amount,2)))
Explanation:
This line imports math library
import math
This line initializes principal amount to 8000
principal = 8000
This line initializes rate to 0.025
rate = 0.025
The following is an iteration from year 1 to 10
for i in range(1, 11):
This calculates the amount at the end of the year
amount = principal + principal * rate
This calculates the amount at the beginning of the next year
principal = amount
This prints the calculated amount
print("Year "+str(i)+": "+str(round(amount,2)))
4. Leah Jacobs is starting her own dance studio and
wants to create digital media and use productivity
software to support her business. She is hiring a
graphic artist to create a logo for her business. She
wants to use the logo across all visual
communications at the company, from business
cards to database forms, to websites and social
media. What programs and apps should she
consider using to run her business?
Explanation. First of all she needs is a video or graphic editing software for digital media. She may also need a CRM software.Leah Jacobs can always use Google AdWords services as it will not only help her increase brand awareness, it would reach more customers through their e-mail inbox. Google AdWords is faster than SEO and will help her measure the growth and performance...
How many clients has
Accenture engaged globally on blockchain?
4) Create a text file (you can name it sales.txt) that contains in each line the daily sales of a company for a whole month. Then write a Java application that: asks the user for the name of the file, reads the total amount of sales, calculates the average daily sales and displays the total and average sales. (Note: Use an ArrayList to store the data).
Answer:
Here's an example Java application that reads daily sales data from a text file, calculates the total and average sales, and displays the results:
import java.util.ArrayList;
import java.util.Scanner;
import java.io.File;
import java.io.FileNotFoundException;
public class SalesDemo {
public static void main(String[] args) {
// Ask the user for the name of the file
Scanner input = new Scanner(System.in);
System.out.print("Enter the name of the sales file: ");
String fileName = input.nextLine();
// Read the daily sales data from the file
ArrayList<Double> salesData = new ArrayList<>();
try {
Scanner fileInput = new Scanner(new File(fileName));
while (fileInput.hasNextDouble()) {
double dailySales = fileInput.nextDouble();
salesData.add(dailySales);
}
fileInput.close();
} catch (FileNotFoundException e) {
System.out.println("Error: File not found!");
System.exit(1);
}
// Calculate the total and average sales
double totalSales = 0.0;
for (double dailySales : salesData) {
totalSales += dailySales;
}
double averageSales = totalSales / salesData.size();
// Display the results
System.out.printf("Total sales: $%.2f\n", totalSales);
System.out.printf("Average daily sales: $%.2f\n", averageSales);
}
}
Assuming that the sales data is stored in a text file named "sales.txt" in the format of one daily sale per line, you can run this program and input "sales.txt" as the file name when prompted. The program will then calculate the total and average sales and display the results.
I hope this helps!
Explanation:
Help asap dont answer with a link
Answer:
90
Explanation:
dur nearly all my friends and family knows that
Sue bought an expensive audio recorder to complete a project. She only uses it a few times a year, so she lists her tool online for others to use for a small
fee. Sue is participating in
Sue is participating in the sharing economy by renting out her rarely used audio recorder online.
What is sharing economy?The sharing economy is a community-based practice where individuals share their underutilized resources or assets with others, promoting resource efficiency, etc.
Sue engages in the sharing economy by offering her costly audio recorder for rent online, joining a community-based practice where individuals share their seldom-used belongings, promoting resource efficiency, cost-sharing, and sustainability, allowing Sue to earn income while granting others access to the recorder without needing to own it individually.
Learn more about sharing economy on:
https://brainly.com/question/1418025
#SPJ1
(Please Help! Timed Quiz!) Messages that have been accessed or viewed in the Reading pane are automatically marked in Outlook and the message subject is no longer in bold. How does a user go about marking the subject in bold again?
*Mark as Read
*Flag the Item for follow-up
*Assign a Category
*Mark as Unread
Answer:
D Mark as Unread
Explanation:
I just took the test
Imagine you have just learned a new and more effective way to complete a task at home or work. Now, you must teach this technique to a friend or coworker, but that person is resistant to learning a new way of doing things. Explain how you would convince them to practice agility and embrace this new, more effective method.
if a person is resistant to learning a new way of doing things, one can practice agility by
Do Implement the changeMake a dialogue with one's Unconscious. Free you mind to learn.How can a person practice agility?A person can be able to improve in their agility by carrying out some agility tests as well as the act of incorporating any form of specific drills into their workouts.
An example, is the act of cutting drilling, agility ladder drills, and others,
A training that tends to help in the area of agility are any form of exercises such as sideways shuffles, skipping, and others.
Therefore, if a person is resistant to learning a new way of doing things, one can practice agility by
Do Implement the changeMake a dialogue with one's Unconscious. Free you mind to learn.Learn more about agility from
https://brainly.com/question/15762653
#SPJ1
Hey all! How would you write write this code?
Write a C++ program using variables and loops in order to implement the Hi-Low strategy of card counting and keep a running count. The Hi-Low strategy of card counting assigns one of three values to a card, based on its face value. The table below breaks down these values. FACE VALUE ASSIGNEDVALUE 2, 3, 4, 5, 6 +1 7, 8, 9 0 10, J, Q, K, A -1 In a typical game of Blackjack, a card counter will start with a fresh deck and a count of 0. Each time a card is played, its assigned value is added (or subtracted) from what is known as the running count. The running count rolls over from hand to hand. For instance, if the first 7 cards of a game were: Queen, Jack, 4, 6, 7, Jack, 9, then the running count would be (0) -1 -1 + 1 + 1 + 0 –1 + 0 =-1
The program is an illustration of loops.
Loops are used to perform repetitive actions.
The program in C++ where comments are used to explain each line, is as follows:
#include <string>
#include <iostream>
using namespace std;
int main(){
//This declares all variables
int n, count = 0; string k;
//This gets input for the number of cards
cin>>n;
//The following is repeated n-times
for(int i = 0;i <n;i++){
//This gets input for the current card value
cin>>k;
//If the card is a digit
if(isdigit(k[0])){
//This checks if the card number is between 2 and 6 (inclusive)
if(stoi(k) >= 2 && stoi(k) <= 6){
//If yes the face value is increased by 1
count+=1;
}
//This checks if the card number is 10
else if(stoi(k) == 10){
//If yes the face value is decreased by 1
count-=1;
}
}
//This checks if the card number is J, Q, K or A
else if (k == "J" || k == "Q" || k == "K" || k == "A") {
//If yes the face value is decreased by 1
count-=1;
}
}
//This prints the face value
cout<<count;
return 0;
}
At the end of the program, the face value is printed.
Read more about similar programs at:
https://brainly.com/question/24578223
HELP PLEASEEEEEE
Code a color changing background in tynker python interactive using turtle in a loop ex. red, orange, yellow, blue, pink
The code that can execute the above output is:
import turtle
colors = ["red", "orange", "yellow", "blue", "pink"
index = 0
turtle.bgcolor(colors[index])
while True
index = (index + 1) % len(colors)
turtle.bgcolor(colors[index])
how does the code work?This code imports the turtle module and defines a list of colors. t then sets the background color to the first color in the list. The code then enters a loop that changes the background color to the next color in the list every time the loop repats.
The % operator ensures that the index variable stays within the range of the colors list. The loop will continue indefinitely until the user stops the program.
Learn more about codes:
https://brainly.com/question/31228987
#SPJ1
Which of the following is a reason to use a template?
a. To save time when creating a new presentation
b. To use a consistent design throughout your presentation
c. To get ideas for possible content for a presentation
Answer:
B, To use a consistent design throughout your presentation
Explanation:
Templates basically enforce overall consistency by having a pre-determined structure and layout. All documents made using a template will match its layout exactly. When it comes to your document's content, Word's Styles tool is a great way to maintain consistent formatting.
Most jobs in computer disciplines require which minimum level of education?
O A. Master's degree
B. Bachelor's degree
C. High school diploma
D. Associate's degree
Answer:
bachelor's degree
Explanation:
typically bachelor's degree in computer or information science
G. Write OOP in foll. What's aprogramming language?examples programming languages ? Outline any five
Explanation:
Significant object-oriented languages include: Java, C++, C#, Python, R, PHP, Visual Basic.NET, JavaScript, Ruby, Perl, SIMSCRIPT, Object Pascal, Objective-C, Dart, Swift, Scala, Kotlin, Common Lisp, MATLAB, and Smalltalk.
I hope it helps you don't forget to give ratings
for numX in [3,5]:
for numY in [1,2]:
print (numX, numY)
31
51
32
52
3 1
5 1
3 2
5 2
31
32
51
52
3 1
3 2
5 1
5 2
Answer:
The answer is
3 1
3 2
5 1
5 2
Explanation:
Edge 2020
Answer: 3 1, 3 2, 5 1, 5 2
Explanation: got it right on edgen
Components of a product or system must be
1) Reliable
2) Flexible
3) Purposeful
4)Interchangeable
Answer:
The correct answer to the following question will be Option D (Interchangeable).
Explanation:
Interchangeability applies towards any portion, part as well as a unit that could be accompanied either by equivalent portion, component, and unit within a specified commodity or piece of technology or equipment.This would be the degree to which another object can be quickly replaced with such an equivalent object without re-calibration being required.The other three solutions are not situation-ally appropriate, so option D seems to be the right choice.
Mission statement base on shoes company ? Help me
Here are 2 examples:
- Bringing comfortable walking, running, biking, and adventuring to the world.
- Transforming the way you live your life, two soles at a time.
A mission statement should be focused on what a company is about at its core roots. What's the driver for why the company does what it does? Often it is related to why a company is relevant in its industry.
Which type of photographer documents plants and weather in their natural habitat?
a
Portrait
b
Nature
c
Product
d
Scientific
Which of the following organizations maintains a database of vulnerabilities and uses the CVE format?
NIST, A section of the US Department of Commerce is the National Institute of Standards and Technology.
How do CVE details work?NVD data is combined with information from other databases, such the Exploit Database, in a database called CVE Details. You can browse vulnerabilities by vendor, product, type, and date using this tool. It contains vulnerabilities specified by Bugtraq ID, Microsoft Reference, CVE, and others.
How is CVE made?A potential cybersecurity vulnerability is first identified before a CVE Record is created. The CVE Program Secretariat then posts the CVE Record on the CVE website after a CVE Numbering Authority (CNA) has assigned the information a CVE ID and provided a description and references.
To know more about CVE visit:
brainly.com/question/29451810
#SPJ4
__________ often causes overactive eye movement.
A. Alcohol
B. Nicotine
C. Morphine
D. Xanax
The process of making changes to an information system to evolve its functionality, to accommodate changing business needs, or to migrate it to a different operating environment is known as _____________ maintenance.
Answer:
Corrective
Explanation:
An information system interacts with the overall system by receiving data in its raw forms and information in a usable format.
Information system can be defined as a set of components or computer systems, which is used to collect, store, and process data, as well as dissemination of information, knowledge, and distribution of digital products.
Generally, it is an integral part of human life because individuals, organizations, and institutions rely on information systems in order to perform their duties, functions or tasks and to manage their operations effectively. For example, all organizations make use of information systems for supply chain management, process financial accounts, manage their workforce, and as a marketing channels to reach their customers or potential customers.
Additionally, an information system comprises of five (5) main components;
1. Hardware.
2. Software.
3. Database.
4. Human resources.
5. Telecommunications.
Corrective maintenance can be defined as the process of making significant changes to an information system in order to evolve or transform its functionality, to accommodate and tolerate continuously changing business needs, or to migrate it to a different (new) operating environment.
This ultimately implies that, a corrective maintenance is performed so as to rectify (repair) faulty equipments or systems and to restore an underperforming resource to an operational or optimum status.
Given parameters b and h which stand for the base and the height of an isosceles triangle (i.e., a triangle that has two equal sides), write a C program that calculates: The area of the triangle; The perimeter of the triangle; And The volume of the cone formed by spinning the triangle around the line h The program must prompt the user to enter b and h (both of type double) The program must define and use the following three functions: Calc Area (base, height) //calculates and returns the area of the triangle Calc Perimeter (base, height) //calculates and returns the perimeter Calc Volume(base, height) //calculates and returns the volume
Answer:
The area of the triangle is calculated as thus:
\(Area = 0.5 * b * h\)
To calculate the perimeter of the triangle, the measurement of the slant height has to be derived;
Let s represent the slant height;
Dividing the triangle into 2 gives a right angled triangle;
The slant height, s is calculated using Pythagoras theorem as thus
\(s = \sqrt{b^2 + h^2}\)
The perimeter of the triangle is then calculated as thus;
\(Perimeter = s + s + b\)
\(Perimeter = \sqrt{b^2 + h^2} + \sqrt{b^2 + h^2} +b\)
\(Perimeter = 2\sqrt{b^2 + h^2} + b\)
For the volume of the cone,
when the triangle is spin, the base of the triangle forms the diameter of the cone;
\(Volume = \frac{1}{3} \pi * r^2 * h\)
Where \(r = \frac{1}{2} * diameter\)
So, \(r = \frac{1}{2}b\)
So, \(Volume = \frac{1}{3} \pi * (\frac{b}{2})^2 * h\)
Base on the above illustrations, the program is as follows;
#include<iostream>
#include<cmath>
using namespace std;
void CalcArea(double b, double h)
{
//Calculate Area
double Area = 0.5 * b * h;
//Print Area
cout<<"Area = "<<Area<<endl;
}
void CalcPerimeter(double b, double h)
{
//Calculate Perimeter
double Perimeter = 2 * sqrt(pow(h,2)+pow((0.5 * b),2)) + b;
//Print Perimeter
cout<<"Perimeter = "<<Perimeter<<endl;
}
void CalcVolume(double b, double h)
{
//Calculate Volume
double Volume = (1.0/3.0) * (22.0/7.0) * pow((0.5 * b),2) * h;
//Print Volume
cout<<"Volume = "<<Volume<<endl;
}
int main()
{
double b, h;
//Prompt User for input
cout<<"Base: ";
cin>>b;
cout<<"Height: ";
cin>>h;
//Call CalcVolume function
CalcVolume(b,h);
//Call CalcArea function
CalcArea(b,h);
//Call CalcPerimeter function
CalcPerimeter(b,h);
return 0;
}
How does calculate() work?
Answer:
calculate works by determining the amount of something
Explanation: