Answer:
Find the answers in txt file
Explanation:
Your task is to write and test a function which takes three arguments (a year, a month, and a day of the month) and returns the corresponding day of the year (for example the 225th day of the year), or returns None if any of the arguments is invalid.
Hint: You need to find the number of days in every month, including February in leap years.
Answer:
This is in python
Explanation:
Alter my code if you need anything changed. (You may need to create a new function to add a day to February if necessary)
months = [31,28,31,30,31,30,31,31,30,31,30,31]
monthNames = ['january','february','march','april','may','june',
'july','august','september','october','november','december']
array = []
def test(y,m,d): #Does not account for leap-year. Make a new function that adds a day to february and call it before this one
if m.lower() not in monthNames or y < 1 or d > 31:
if m.lower() == "april" or m.lower() == "june" or m.lower() == "september" or m.lower() == "november" and d > 30:
return None
elif m.lower() == "february" and d > months[1]:
return None
return None
num = monthNames.index(m.lower()) #m should be the inputted month
months[num] = d
date = months[num]
for n in range(num):
array.append(months[n])
tempTotal = sum(array)
return tempTotal + date
x = int(input("Enter year: "))
y = input("Enter month: ")
z = int(input("Enter day: "))
print(f"{y.capitalize()} {z} is day {test(x,y,z)} in {x}")
A cubic inch is equivalent to which of the following values?
A.) 27.387 ml
B.) 25.4 ml
C.) 16.387 ml
D.) 29.574 ml
Answer:
C. 16.387
Explanation:
what is the coefficient in 2m³n
Answer:
i think it's '2'
Explanation:
cause coeffecient is the numerical factor of a term.
"We can't a computer use source code
Answer:
Explanation:
There are two main reasons why you can't access the source code from applications on your computer: It isn't present on your computer. The source code isn't really needed to run the application, the executable is (.exe) The executable is just a bunch of machine code stuff that isn't human readable.
what is computers machain?
Answer:
the electronic device which take data process it and give meaningful results is called computer machine
You decide that you want to run multiple operating systems on a single machine which of these will you need?
firmware
multitasker
hypervisor
0S switcher
Answer:
Hyer-V = Hypervisor
Explanation:
a triangular number is a number that is the sum of the integers from 1 to some integer n. thus 1 is a triangular number because it is the sum of the integers from 1 to 1; 6 is a triangular number because 1 + 2 + 3 = 6.given the non-negative integer n, create a list of the first n triangular numbers. thus if n was 5, the list would be: {1, 3, 6, 10, 15}.assign the list to variable traingulars
Answer:
def triangular_numbers(n):
triangulars = []
sum = 0
for i in range(1, n+1):
sum += i
triangulars.append(sum)
return triangulars
# Test the function
print(triangular_numbers(5)) # Output: [1, 3, 6, 10, 15]
Explanation:
To create a list of the first n triangular numbers, you can use a for loop to iterate from 1 to n, and for each iteration, add the current number to the sum of the previous numbers.
This function will create a list of the first n triangular numbers and return it. You can then assign the returned list to the variable triangulars.
What is the output by the code below system.out.print(8-4+2);
Answer:
6
Explanation:
Hackers can exploit weaknesses in operating systems and other software resources. Which action should an administrator take to protect a network from criminals?
A. Set up web filtering software to keep users from accessing questionable sites.
B. Run regular backups on all network resources.
C. Use strong passwords to keep malware from attacking network resources.
D. Install software updates that include patches created to fix security flaws.
An administrator should apply software upgrades that contain security patch updates to safeguard a network from hackers and stop the exploitation of software defects. The correct option is D.
Software updates are essential because they guarantee that known vulnerabilities are fixed, lowering the possibility of unauthorised access and prospective attacks.
Administrators can patch up any potential vulnerabilities that hackers might try to exploit by remaining current with the most recent patches and security upgrades offered by software providers.
Additionally, creating secure passwords is crucial, but doing so by itself is insufficient to fend against all security risks.
Web filtering software is a partial solution that can aid in preventing people from accessing dubious websites.
Thus, the correct option is D.
For more details regarding vulnerabilities, visit:
https://brainly.com/question/30296040
#SPJ1
3
Drag each label to the correct location on the image.
An organization has decided to initiate a business project. The project management team needs to prepare the project proposal and business
justification documents. Help the management team match the purpose and content of the documents.
contains high-level details
of the proposed project
contains a preliminary timeline
of the project
helps to determine the project type,
scope, time, cost, and classification
helps to determine whether the
project needs meets business
needs
contains cost estimates,
project requirements, and risks
helps to determine the stakeholders
relevant to the project
Project proposal
Business justification
Here's the correct match for the purpose and content of the documents:
The Correct Matching of the documentsProject proposal: contains high-level details of the proposed project, contains a preliminary timeline of the project, helps to determine the project type, scope, time, cost, and classification, helps to determine the stakeholders relevant to the project.
Business justification: helps to determine whether the project needs meet business needs, contains cost estimates, project requirements, and risks.
Please note that the purpose and content of these documents may vary depending on the organization and specific project. However, this is a general guideline for matching the labels to the documents.
Read more about Project proposal here:
https://brainly.com/question/29307495
#SPJ1
I have a question about this programming assignment. The outcome when the user puts in Taylor for guest one and Fernando for guest 2 should be, "Your party is ruined and another bad pop song will be written." However, it does not. What do I add to get this outcome? Do I need more brackets?
Use guestNumber1.equals(Fernando) instead of the double equal signs. You cant compare strings with ==
The two basic types of media are:
A) statistical and frequency
B) guided and wireless (radiated)
C) local and wide area
D) attenuator and Gaussian
E) duplexed and non-duplexed
Give an example of a class and an example of an object. Describe what a class is, what an object is, and how they are related. Use your examples to illustrate the descriptions.
Answer:
Science. Science is where you learn about the worlds enviroment.
Book. A Book is a object that has words in it that you can read. It has sometimes thick pages or thin pages.
Read this outline for an argumentative essay about government.
1. People have different ideas about the role of government.
A. The primary_purpose of government is to provide social services.
2. Government should provide services for
people who are poor or elderly.
A. Government can effectively provide the services that poor and elderly people need.
B. Food stamps keep people from going hungry.
C. Medicare and Medicaid provide health care.
D. Some people believe social services are an entitlement and not a right,
but many people could not survive without them.
Government's main role is provide to social services, such as food stamps.
The underlined sentence in the outline is the
O claim.
• conclusion.
Answer:
First option.
Explanation:
The underlined sentence in the outline numbered 1 (People have different ideas about the role of government) is the introduction.
What is an introduction?The essential concept of an outline for a particular piece of writing, such as an essay, is presented in a single brief sentence for the body paragraphs. In this manner, it is positioned at the start and briefly summarizes the thesis of an article.
Because it appears at the beginning of the outline and contains the key notion that unifies all the other ideas offered in the subsequent phrases, the sentence with the asterisk (*) serves as the introduction. Government can effectively provide the services that poor and elderly people need.
Therefore, The underlined sentence in the outline numbered 1 (People have different ideas about the role of government) is the introduction.
Learn more about an introduction, here:
brainly.com/question/18119893
#SPJ5
A shot made while running is a ____________.
Answer:
A shot made while running is called a layup.
Which one of these is NOT an indicator that an email is spam?
The email includes your name.
The email has a lot of errors in it.
The email tries to get you to act quickly.
The email address has many numbers in it.
The one that is not an indicator that an email is a spam is the email that includes your name. The correct option is a.
What are spam emails?Unsolicited messages sent in bulk via email are referred to as email spam, junk email, spam mail, or simply spam. The term was inspired by a Monty Python skit in which the term for a tinned pork product was Spam is pervasive, inevitable, and monotonous.
To add email addresses to their mailing lists, spammers buy them in bulk from specialized sources. There's a good probability that your address was included on a list that was recently sold to one or more scammers if you've seen a dramatic rise in the number of spam emails arriving in your account.
Therefore, the correct option is a. The email includes your name.
To learn more about spam email, refer to the link:
https://brainly.com/question/15058236
#SPJ6
PLEASE HELP ME THIS IS DUE TODAY !!! worrth 30 points.
The shop has been open for a week now and you need to work on the first payroll for your two employees, Sean and Justine. Sean’s hourly pay is $8.25. He worked 10 hours this week and is taxed at a 5% rate. Justine’s hourly pay is $9.00. She worked 30 hours this week and is taxed at a 6% rate.
a) Create a spreadsheet for your payroll. Make sure you use a formula to automatically calculate Total Pay.
Here's a sample spreadsheet for your payroll:
The SpreadsheetEmployee Name Hourly Rate Hours Worked Total Pay Tax Rate Taxes Withheld Net Pay
Sean $8.25 10 =B2*C2 5% =D2*E2 =D2-F2
Justine $9.00 30 =B3*C3 6% =D3*E3 =D3-F3
In this spreadsheet, we have columns for the employee name, hourly rate, hours worked, total pay, tax rate, taxes withheld, and net pay.
For each employee, we use a formula to calculate their total pay based on their hourly rate and hours worked. The formula used in the Total Pay column is "=hourly rate * hours worked".
We also have a column for tax rate, where we input the percentage at which the employee is taxed. Using this tax rate, we calculate the taxes withheld from the employee's pay in the Taxes Withheld column. The formula used in the Taxes Withheld column is "=total pay * (tax rate/100)".
Finally, we calculate the net pay for each employee by subtracting the taxes withheld from their total pay in the Net Pay column. The formula used in the Net Pay column is "=total pay - taxes withheld".
Read more about spreadsheets here:
https://brainly.com/question/26919847
#SPJ1
Paul has opened a bespoke tailoring shop. He wants to work online to keep a database of all his customers, send emails when garments are ready, create designs, and maintain financial records using software. Which productivity suite should he consider?
a. Prezi, G suite
b. G suite, Zoho
c. OpenOffice, G suite
d. Zoho, Apple iWork
Answer:
c. OpenOffice, G suite
Explanation:
The main advantage of OpenOffice is that it is free and obviously keeps your costs down. It has a lot of features that can help Paul (and really anyone else). It offers decent word processing, spreadsheets, databases and graphics, which can cover most, if not all, of Paul's needs.
Google's G Suite also offers cheap plan's that can satisfy Paul's needs regarding emails, CRM features and cloud storage. Even though it is not free, Paul would probably need only the most basic plan at just $6 per month.
The productivity suite Paul should consider is OpenOffice. Therefore, the correct answer is option C.
The primary benefit of OpenOffice is that it is cost free, which obviously lowers your expenses. Paul can benefit mostly from its many features. The majority if not all of Paul's demand may be met by its decent word processing, spreadsheets, databases, and graphical features.
Therefore, the correct answer is option C.
Learn more about the OpenOffice here:
https://brainly.com/question/4463790.
#SPJ6
Write a class definition named Book. The Book class should have data attributes for a book’s title, the author’s name, and the publisher’s name. The class should also have the following:
An _ _init_ _ method for the class. The method should accept an argument for each of the data attributes.
Accessor and mutator methods for each data attribute.
An _ _str_ _ method that returns a string indicating the state of the object
Make a class called "Book" that has data attributes for the title, author, and publisher. Include an initialization method, accessor and mutator functions for each attribute, and a str function to show the current state.
What do Python class members accessors and mutators do?A function that returns a duplicate of an internal variable or computed value is known as an accessor method. These are frequently given names that begin with the word get. A function that slightly alters the value of an internal data variable is known as a mutator method.
function __init__(self, title, author, publisher) class Book:
self.title is the same as title self.Author is the same as the author.Publisher is also Publisher.
Define get_title() and return self.title.
self.title = title; def set_title(self, title);
return self.author from the function def get_author
self.author equals author in the definition of set_author(self, author).
return self.publisher from the function def get_publisher
set_publisher(self, publisher) should be defined as self.Publisher is also Publisher.
return f from def __str__(self): "'self.title' by'self.author', published by'self.publisher'"
To know more about data visit:-
https://brainly.com/question/13650923
#SPJ1
C++ Programming Summary In an elementary school, a mixture of equal...
C++ Programming
Summary
In an elementary school, a mixture of equal amounts of nuts and dried fruit is provided during lunch. Suppose that the number of calories in each pound of nuts is 0.70 times the number of calories in each pound of dried fruit.
Instructions
Produce a program that prompts the user to input:
The number of students in the elementary school
The number of calories required for each student from the mixture
The number of calories in each pound of nuts.
The program outputs:
The amount of nuts and dried fruit needed for the students.
For simplicity, assume that each student requires the same amount of calories.
This is the code I have at the moment. I am not understanding what I am missing. The output is not what is expected.
When the input is "653" "577" "2744" the output should be "56.539" "56.539"
#include
#include
using namespace std;
int main()
{
double NoStudents, TotalcalRequired, caloriesNut, caloriesFruit;
double RequiredCal, TotalNut, Totalfruit;
cout << "Enter the number of students in the elementary school: "; cin >> NoStudents;
cout << "Enter the number of calories required for each student from the mixture: "; cin >> RequiredCal;
cout << "Enter the number of calories in each pound of nuts: "; cin >> caloriesNut;
TotalcalRequired = NoStudents * RequiredCal; caloriesFruit = caloriesNut / 0.70; TotalNut = TotalcalRequired / caloriesNut; Totalfruit = TotalcalRequired / caloriesFruit;
cout << "The total nuts needed is " << ceil(TotalNut) <
return 0;
}
You must create C++ programme to figure out how much of each component is required to make the combination.is a quick description of several possible approaches to the issue: Set up two variables to
The object-oriented programming paradigm is supported by the general-purpose computer language C++. It was created as a C programming language extension and includes features like classes, templates, and exceptions. Software for many different purposes, including as operating systems, embedded systems, video games, and financial analysis tools, is frequently developed in C++.Functions, variables, and classes described in source code files make up a C++ programme. An executable file containing the code is created and may be executed on a computer. Moreover, C++ offers libraries that offer pre-written code for typical tasks, saving time and effort for developers.High-performing apps are frequently created using the performance and efficiency of C++. It is a
Learn more about C++ programme here:
https://brainly.com/question/2750731
#SPJ4
When choosing a new computer to buy, you need to be aware of what operating it uses.
Answer: Size & Form-Factor, Screen Quality,Keyboard quality,CPU, RAM, Storage,Battery Life, USB 3.0, Biometric Security,Build quality.
Explanation:
1 - 7 are the most important for laptops and for desktops 1,3,4,5and 6.
Hope this helped!
After reading all L02 content pages in Lesson 02: Inheritance and Interfaces, you will complete this assignment according to the information below.Do not use the scanner class or any other user input request. You application should be self-contained and run without user input.Assignment ObjectivesPractice on implementing interfaces in JavaFootballPlayer will implement the interface TableMemberOverriding methodswhen FootballPlayer implements TableMember, FootballPlayer will have to write the real Java code for all the interface abstract methodsDeliverablesA zipped Java project according to the How to submit Labs and Assignments guide.O.O. Requirements (these items will be part of your grade)One class, one file. Don't create multiple classes in the same .java fileDon't use static variables and methodsEncapsulation: make sure you protect your class variables and provide access to them through get and set methodsAll the classes are required to have a constructor that receives all the attributes as parameters and update the attributes accordinglyAll the classes are required to have an "empty" constructor that receives no parameters but updates all the attributes as neededFollow Horstmann's Java Language Coding GuidelinesOrganized in packages (MVC - Model - View Controller)Contents
Solution :
App.java:
import Controller.Controller;
import Model.Model;
import View.View;
public class App
{
public static void main(String[] args) // Main method
{
Model model = new Model(); // Creates model object.
View view = new View(); // Creates view object.
Controller controller = new Controller(view, model); // Creates controller object that accepts view and model objects.
}
}
\(\text{Controller.java:}\)
package Controller;
\(\text{impor}t \text{ Model.Model;}\)
import View.View;
\(\text{public class Controller}\)
{
Model model; // Model object
View view; // View object
public Controller(View v, Model m) // Method that imports both model and view classes as objects.
{
model = m;
view = v;
//view.basicDisplay(model.getData()); // basicDisplay method from View class prints FootballPlayer objects as Strings from Model class.
view.basicDisplay(model.getMembers().get(1).getAttributeName(3));
view.basicDisplay(model.getMembers().get(1).getAttribute(3));
view.basicDisplay(model.getMembers().get(1).getAttributeNames());
view.basicDisplay(model.getMembers().get(1).getAttributes());
view.basicDisplay("size of names=" + model.getMembers().get(1).getAttributeNames().size());
view.basicDisplay("size of attributes=" + model.getMembers().get(1).getAttributes().size());
}
}
FootballPlayer.java:
package Model;
import java.util.ArrayList;
public class FootballPlayer extends Person implements TableMember { // Used "extends" keyword to inherit attributes from superclass Person, while using "implements" to implement methods from TableMember interface.
private int number; // Creating private attribute for int number.
private String position; // Creating private attribute for String position.
public FootballPlayer(String name, int feet, int inches, int weight, String hometown, String highSchool, int number, String position) // Full parameter constructor for FootballPlayer object (using "super" keyword to incorporate attributes from superclass).
{
super(name, feet, inches, weight, hometown, highSchool); // Used super keyword to include attributes from superclass.
this.number = number; // Value assigned from getNumber method to private number instance variable for FootballPlayer object.
this.position = position; // Value assigned from getPosition method to private position instance variable for FootballPlayer object.
}
public FootballPlayer() // No parameter constructor for FootballPlayer object.
{
this.number = 0; // Default value assigned to private number instance variable under no parameter constructor for FootballPlayer object.
this.position = "N/A"; // Default value assigned to private position instance variable under no parameter constructor for FootballPlayer object.
}
Override
public String getAttribute(int n) // getAttribute method that is implemented from interface.
{
switch (n) { // Switch statement for each attribute from each FootballPlayer object. Including two local attributes, denoted by this. While the others are denoted by "super".
case 0:
return String.valueOf(this.number); // Use of the dot operator allowed me to discover String.valueOf method to output int attributes as a string.
case 1:
return this.position;
case 2:
return super.getName();
case 3:
return super.getHeight().toString();
case 4:
return String.valueOf(super.getWeight());
case 5:
return super.getHometown();
case 6:
return super.getHighSchool();
default:
return ("invalid input parameter");
}
}
Override
public ArrayList<String> getAttributes() // getAttributes ArrayList method that is implemented from interface.
{
ArrayList<String> getAttributes = new ArrayList<>();
for(int i = 0; i <= 6; i++){ // For loop to add each attribute to the getAttributes ArrayList from getAttributes method.
getAttributes.add(getAttribute(i));
}
return getAttributes;
}
Override
public String getAttributeName(int n) // getAttributeName method implemented from interface.
{
switch (n) { // Switch statement for the name of each attribute from each FootballPlayer object.
case 0:
return "number";
case 1:
return "position";
case 2:
return "name";
case 3:
return "height";
case 4:
return "weight";
case 5:
return "hometown";
case 6:
return "highSchool";
default:
return ("invalid input parameter");
}
}
Complete the code to generate a pseudo-random integer between 1 and 44, including the possibility of both 1 and
44.
>>> import secrets
>>> secret
Answer:
Explanation:
.randbelow(44) + 1
The code above uses the secrets module, which is a part of the Python standard library and uses a cryptographically strong random number generator. The randbelow() function generates a random integer below the number given as an argument. In this case, the argument is 44, which means that the function will generate a random integer between 0 and 43. To get a random integer between 1 and 44, we add 1 to the result of the function.
Define a function FindSmallestVal() with no parameters that reads integers from input until a positive integer is read. The function returns the lowest of the integers read.
Ex: If the input is -35 -80 -75 25, then the output is:
-80
Note: Positive numbers are greater than 0.
A function, according to a technical definition, is a relationship between a set of inputs and a set of potential outputs, where each input is connected to precisely one output.
A method with a return value is called a function. Set the return type of a method to the type of the value it is returning to define the method as a function. Math is an illustration of a built-in function in Java. pow() Java only requires the method name, two parentheses (), and a semicolon to invoke a method (;). If the method's declaration has parameters, the parameters are given in between parentheses () without their datatypes being stated.
Learn more about function here-
https://brainly.com/question/28939774
#SPJ4
what is a computer and explain it's features
Answer: A computer is a technological device usually used for storing or transferring data, usually in binary form. The features of a computer now are outstanding from say an old Macintosh, or anything before Windows 7 really, some of its features are for programming like PLC Robots, and what most people would use it for is internet access, a way to communicate with friends or my personal favorite gaming an entire world of games on applications like Steam or Epic Games, and even if you're not a gamer you can still appreciate the fast speeds and FPS I run at a standard 120FPS because it keeps most games running smooth and still has high-quality graphics.
5. What are Excel cell references by default?
Relative references
Absolute references
Mixed references
Cell references must be assigned
Answer: relative references
Explanation:
By default, all cell references are RELATIVE REFERENCES. When copied across multiple cells, they change based on the relative position of rows and columns. For example, if you copy the formula =A1+B1 from row 1 to row 2, the formula will become =A2+B2.
PLEASE HELP!!!
What is the next line?
>>> tupleC = (3, 8, 11, 8, 8, 11)
>>> tupleC.index(11)
O 3
О 0
O 2
O 1
What tool is available in Word Online?
Show Document
Watermark
Mark Entry
Page Numbers
Answer:
WATERMARK
Explanation:
SORRY IF MY ANSWER IS WRONG I HOPE THIS HELPED YOU AS MUCH AS POSSIBLE
Code a complete Java program to load and process a 1-dimensional array.
Create clear comments as you code to tell me what you are doing.
Import the Java libraries that you will need.
Create a single dimensional array that will hold 15 wages.
In the main, load an array with all of the records from a .txt file named Salary txt. The file has 15 records in it.
Sort the array in ascending order.
Write a method named increaseWages(). This method will add $500 to each of the 15 wages. In other words, you are giving each person a raise of $500.
Pass the array to the method from the main().
Increase the wage amounts in the array (as described above), in the method. In other words, in the end the array should hold the NEW, higher wages.
Output each new wage (use the console for this)
Calculate a total of the new wages in the method
Output the total of the new wages in the method (use a dialog box for this)
Return the array with the new wages to the main().
There is NO user interaction in this program.
Answer:
Here you go.Consider giving brainliest if it helped.
Explanation:
import java.io.*;//include this header for the file operation
import java.util.*;//to perform java utilities
import javax.swing.JOptionPane;//needed fro dialog box
class Driver{
public static void main(String args[]){
int wages[]=new int[15];//array to hold the wages
int index=0;
try{
//use try catch for the file operation
File file=new File("wages.txt");
Scanner sc=new Scanner(file);//pass the file object to the scanner to ready values
while(sc.hasNext()){
String data=sc.nextLine();//reads a wage as a string
String w=data.substring(1);//remove the dollar from the string data
wages[index++]=Integer.parseInt(w);//convert the wage to int and store it in the array
}
sc.close();//close the scanner
}catch(FileNotFoundException e){
System.out.println("Error Occurrred While Reading File");
}
//sort the array using in built sort function
Arrays.sort(wages);
//print the wages
System.out.println("Wages of 15 person in ascending order:");
for(int i=0;i<wages.length;i++){
System.out.print("$"+wages[i]+" ");
}
//call the increases wages method
wages=increaseWages(wages);//this method return the updated wages array
}
//since we can call only static methods from main hence increaseWages is also static
public static int[] increaseWages(int wages[]){
//increase the wages
for(int i=0;i<wages.length;i++){
wages[i]+=500;
}
//print the new wages
int sum=0;
System.out.println("\n\nNew wages of 15 person in ascending order:");
for(int i=0;i<wages.length;i++){
sum+=wages[i];//sums up the new wages
System.out.print("$"+wages[i]+" ");
}
//display the summation of the new wages in a dialog box
JOptionPane.showMessageDialog(null,"Total of new wages: "+sum);
return wages;
}
}
Which phrase best describes a data scientist?
A. A person who develops advanced computing languages
B. A person who designs and develops hardware for computers
C. A person who builds and installs the memory chips for household
appliances
OD. A person who uses scientific and statistical methods to analyze
and interpret large, complex digital data sets
W
SUBMIT
Answer:
D. A person who uses scientific and statistical methods to analyze and interpret large, complex digital data sets.
Explanation: