Answer:
def mylist(*args):
return args
new_list = mylist(2,3,4,5)
Explanation:
The simple python code above defines a function called mylist that receives multiple length of element as a list and returns the list a new list. The "*args" allows the function to receive any number of item and converts them to a list that is returned in the next statement.
The can also be achieved by simply assigning a squared bracket enclosed list to the variable or with the list() constructor.
Define a toString prototype method that returns the cat's name, gender, and age separated by semicolons.
Answer:
Following are the program to this question:
import java.util.*;//import package for user input
public class Main//defining main class
{
public static String Cat (String name, String gender, int age)//defining string method Cat that accept parameter value
{
return name + ';' + gender + ';' + age;//return parameter value
}
public static void main(String[] args) //defining main method
{
String name,gender;//defining String variable
int age;//defining integer variable
System.out.println("Enter name, gender and age: ");//print message
Scanner obx=new Scanner(System.in);//creating Scanner class object for user input
name=obx.next();//input name value
gender=obx.next();//input gender value
age=obx.nextInt();// input age value
System.out.println(Cat(name,gender,age));//print return method value
}
}
Output:
Enter name, gender and age:
dani
Female
12
dani;Female;12
Explanation:
In the above-given code, a string method Cat is declared, that accepts three variable "name, gender, and age", inside the method return keyword is used that returns the parameter values.
In the main method, the above parameter variable is declared, which is used to input value from the user-end, and used the print method to print its return value.
hello hello . please help me
Answer:
#include <iostream>
using namespace std;
int main() {
int num, check=0;
for(int num = 1; num<=100;num++){
for(int i = 2; i <= num/2; i++) {
if(num % i == 0) {
check=1;
break; } }
if (check==0) { cout <<num<<" "; }
check = 0;
}
return 0;
}
Explanation:
This line declares num as integer which represents digits 1 to 100.
A check variable is declared as integer and initialized to 0
int num, m=0, check=0;
This for loop iterates from 1 to 100
for(int num = 1; num<=100;num++){
This iterates from 2 to half of current digit
for(int i = 2; i <= num/2; i++) {
This checks for possible divisors
if(num % i == 0) {
If found, the check variable is updated to 1
check=1;
And the loop is terminated
break; } }
The following if statement prints the prime numbers
if (check==0) { cout <<num<<" "; }
check = 0;
}
Do you think GE will become one of the top 10 U.S. software companies? Why or why not?
Answer: I do belive GE will be one of the top 10 software companies because each year the software side of GE is growing 20 perecnt per year which is a big deal!
Explanation:
There are different kinds of firms. I think GE will become one of the top 10 U.S. software companies. The world is gradually turning to the production of electric cars and much more appliances and with this, I believe they would grow to the top 10 in no time.
General Electric Company (GE) is known to be one of the top American multinational conglomerate that is seen in New York State.It has its headquartered in Boston and thy have been ranked 33rd in the 2020 ranking, among the Fortune 500 in the United States using their gross revenue.
Learn more about General Electric Company from
https://brainly.com/question/26379157
Write two statements that each use malloc to allocate an int location for each pointer. Sample output for given program:
numPtr1 = 44, numPtr2 = 99
#include
#include
int main(void) {
int* numPtr1 = NULL;
int* numPtr2 = NULL;
/* Your solution goes here */
*numPtr1 = 44;
*numPtr2 = 99;
printf("numPtr1 = %d, numPtr2 = %d\n", *numPtr1, *numPtr2);
free(numPtr1);
free(numPtr2);
return 0;
}
Answer:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int* numPtr1 = NULL;
int* numPtr2 = NULL;
/* Your solution goes here */
numPtr1 = (int *) malloc(10);
numPtr2 = (int *) malloc(20);
*numPtr1 = 44;
*numPtr2 = 99;
printf("numPtr1 = %d, numPtr2 = %d\n", *numPtr1, *numPtr2);
free(numPtr1);
free(numPtr2);
return 0;
}
Explanation:
The C library malloc function is used to assign memory locations (in bytes) to variables. It accepts the size parameter and returns a pointer to the specified variable location.
The two malloc statements above assign two memory locations 10 and 20 to the numPtr1 and numPtr2 integer variables respectively.
A .cache is made up of _____ , each of which stores a block along with a tag and possibly a valid/dirty bit
Answer:
Blocks
Explanation:
A .cache is made up of blocks, each of which stores a block along with a tag and possibly a valid/dirty bit.
Basically, each blocks that makes up the cache stores additional block and sometimes a bit.
ong answer, but make sure to provi
you
reasoning
Sales Company:
W.D. Widgets is a small company that sells widgets. They're mostly made up of salespeople who work with lots of clients.
You've taken over as the sole IT person for this company of 80-100 people.
R teils you to provision a machine for a new employee, you order the hardware directly from a business vendor.
You keep one or two machines in stock, in case of emergency. The users receive a username that you generate for them.
You then give them an orientation on how to login when they start. You currently manage all of your machines using
Windows Active Directory. The company uses only Windows computers. When a new computer is provisioned, you have
to nistallots of sales-specific applications manually onto every machine. This takes a few hours of your time for each
15
machine. When someone has an IT-related request, they email you directly to help them.
Almost all software is kept in-house, meaning that you're responsible for the email server, local machine software, and
instant messenger. None of the company's services are kept on the cloud.
Customer data is stored on a single file server. When a new salesperson starts, you also map this file server onto their
local machine, so that they can access it like a directory. Whoever creates a folder on this server owns that folder and
everything in it. There are no backups to this critical customer data. If a user deletes something, it may be lost for
everyone.
Answer:
Umm just go what your gut tells you to do
Explanation:
turns on her laptop and gets the error message "OS NOT FOUND." She checks the hard disk for damage or loose cable, but that is not the case. What could be a possible cause?
Which statement is true?
1)A deque is a type of collection,
2)A collection is a type of deque.
3)A list is a type of deque.
4)A deque is a type of list.
Answer:
1. A deque is a type of collection.
Explanation:
The statement that is true is as follows:
A deque is a type of collection.Thus, the correct option for this question is A.
What is Deque?Deque may be defined as an ordered and systematic collection of items similar to the queue. It is also known as a double-ended queue. It consists of two ends, a front, and a rear, and the items remain positioned in the collection.
According to the context of this question, a deque is a kind of collection that holds data and information identical to a queue. From here, elements can be added to or eliminated from either the front or back very efficiently.
It is also often called a head-tail linked list. Though properly this signifies specific data with appropriate structure that has been the implementation of a deque.
Therefore, a deque is a type of collection that is a true statement. Thus, the correct option for this question is A.
To learn more about Deque, refer to the link:
https://brainly.com/question/16750037
#SPJ2
explain the main components of a computer system
Answer:
A motherboard.
A Central Processing Unit (CPU)
A Graphics Processing Unit (GPU), also known as a video card.
Random Access Memory (RAM), also known as volatile memory.
Storage: Solid State Drive (SSD) or Hard Disk Drive (HDD)
Explanation:
They all work together to create a system
Drag the tiles to the correct boxes to complete the palrs.
Match the types of letters with their descriptions.
letter of interest
cover letter
thank you letter
letter of recommendation
discusses how you meet job requirements
>
reiterates why you're the best candidate for the job
>
tells more about your character and who you are
expresses your interest in working for a company
Answer:
Letter of interest> tells you more about your character and who you are expresses your interest in working for a company
Letter of recommendation> reiterates why you're the best candidate for the job
Cover letter> discusses how you meet job requirements
Hope this helped!
Answer:
Discusses how you meet job requirements = Cover Letter
Expresses your interest in working for a company = Letter of Interest
Tells more about your character and who you are = Letter of Recommendation
Reiterates why you're the best candidate for the job = Thank You Letter
write passage on computer virus
Answer:
A computer virus is a relatively small program that attaches itself to data and program files before it delivers its malicious act. There are many distinct types of viruses and each one has a unique characteristic. Viruses are broken up into to main classes, file infectors and system or boot-record infectors.
hope it helpsMany electronic devices use a(n) ?, which contains all the circuit parts in a miniature form.
Answer:
An integrated circuit is a single, miniature circuit with many electronically connected components etched onto a small piece of silicon or some other semiconductive material. (A semiconductor is a nonmetallic material that can conduct an electric current, but does so rather poorly.)
Explanation:
Many electronic devices use a(n) integrated circuit which contains all the circuit parts in a miniature form.
The use of integrated circuit is known to be a kind of a single, miniature circuit that has a lot of electronically connected parts that are designed onto a small piece of silicon or semi conductive material.
A lot of electronic components are known to be capacitors, inductors, resistors, diodes, transistors and others.
Learn more about electronic devices from
https://brainly.com/question/11314884
URGENT
You are an art director working for a feature film studio. Create a set for an interior scene of your choosing. Write a description of your scene to give to the principal production team. Include details that an art director would focus time and energy on. Include other production team members with whom you would collaborate. Your description should be at least 150 words.
ndcdeviceid?????????????????????
YESS
Explanation:
YESSssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
If you have 128 oranges all the same size, color, and weight except one orange is heavier than the rest. Write down a C++ Code/Algorithm to search the heavy orange, in how many steps would you be able to find it out?
Answer:
#include <iostream>
using namespace std;
void Search_heavy_orange(int arr[], int l, int r, int x)
{
int count = 0, m = 0;
while (l <= r) {
m = l + (r - l) / 2;
// Check if x is present at mid
if (arr[m] == x) {
count++;
}
// If x greater, ignore left half
if (arr[m] < x) {
l = m + 1;
count++;
}
// If x is smaller, ignore right half
else {
r = m - 1;
count++;
}
}
cout << "............For Worst Case......." << endl;
cout << "Orange with heavy weight is present at index " << m << endl;
cout << "Total number of step performed : " << count << endl;
}
int main()
{
// Assuming each orange is 100 gm and the weight of heavy
// orange is 150 gm
int orange_weight[128];
for (int i = 0; i < 127; i++) {
orange_weight[i] = 100;
}
// At worst case the heavy orange should be at last position
// inside the basket : 127
orange_weight[127] = 150;
// We will pass array , start index , last index and the search element
// as the parameters in the function Search_heavy_orange
Search_heavy_orange(orange_weight, 0, 127, 150);
return 0;
}
Explanation:
A switch is a device that connects multiple computers into a network in which multiple communications links can be in operation simultaneously. True False
Answer:
True
Explanation:
A network switch is also called switching hub or a bridging hub. It is a device that connects multiple computers into a network in which multiple communications links can be in operation simultaneously. It makes use of Mac addresses in the forwarding of the data link layer (layer 2) of the OSI model. Types include managed switches, unmanaged switches, smart switches but to mention a few.
Hi, Everybody i have a question it is almost my B-day i want this lego set
(Nintendo Entertainment System™) BUT THEY ARE SOLD OUT
I NEED HALP
Answer:
You can look at different websites of look on an app for people selling it, or something :p
Explanation:
Write a loop to print all elements in hourly_temperature. Separate elements with a -> surrounded by spaces. Sample output for the given program: (must be in python)
90 -> 92 -> 94 -> 95
Note: There is a space after 95.
------------------------------------------------------------------------------------------------------------------------
hourly_temperature = [90, 92, 94, 95]
for temp in hourly_temperature:
for index,temp in enumerate(str(temp)):
if index != len(temp)-1:
print(temp,'->',end=' ')
else:
print(temp, end='')
print('') # print newline
------------------------------------------------------------------------------------------------------------------------
My expected out is:
90 -> 92 -> 94 -> 95
I keep getting:
90 -> 92 -> 94 -> 95 ->
NOTE: I can't edit the last line "print('') #print newline"
Answer:
Following are the code to this question:
hourly_temperature = [90, 92, 94, 95]#defining a list that holds values
c= 0#defining a variable c
for temp in hourly_temperature:#defining a for loop to count list values
c+= 1#defining c variable to increment the value of c
for index,temp1 in enumerate(str(temp)):#defining for loop for spacing the list value
if index == len(str(temp))-1 and c!= len(hourly_temperature):#defining if block that checks the length of list
print(temp1,'->',end=' ')#print value
elif c == len(hourly_temperature) and index == len(str(temp)) - 1:#defining elif block that checks the length of list
print(temp1, end=' ')#print value
else:#defining else block
print(temp1, end='')#print value
Output:
90 -> 92 -> 94 -> 95
Explanation:
In the above-given code, a list "hourly_temperature" is declared, in which an integer variable c is declared, that holds an integer value that is equal to 0, and two for loop is declared, and in the first loop is used for count list value, and inside the for loop is uses enumerate method to assigns an index for each item and use the conditional statement to check each list value and provide space in each element value.
What is the next line?
>>> tupleOne = [2, 5, 10, 23, 5, 1]
>>> tupleOne.index(5,3)
A)2
B)4
C)1
D)3
Answer:
4
Explanation:got it right on edg.
Answer: 4
Explanation: got it right on edgen
As an interviewer, it is not necessary to be at eye level with interviewee
True
False
Answer:
True
Explanation:
Have a great day
Answer:
True
Hope this helps
Files can be stored on hard drives, network drives, or external drives, but not in the cloud.
True
False
Folders provide a method for organizing files.
True
False
Answer: (1) False, (2) True
Explanation:
What are url addresses for visiting websites? And what are the different parts of a URL? Answer it in a 1-2 paragraph
Answer:
Please read explanation
Explanation:
URL is the short form for "Uniform Resource Locator". A uniform resource locator tells the location of a website to the browser.
Parts of URL:
There are three main parts of URL
ProtocolDomain nameExtensionProtocol defines the type of protocol used for communicating with the website while the domain name is the name assigned to the IP address and the mapping is stored in domain name server and extension tells the type of website i.e.
.com means commercial
.org means non-profitable organization
.edu means educational website
An additional element is path which change with the website navigation.
Select all examples of proper keyboarding technique.
Look at the keys while keyboarding.
Keep your hands higher than your elbows.
Sit up straight.
Relax your fingers.
Aim to make no mistakes.
Answer:
all except keeping your hands higher than your elbows
Answer:
Sit up straight.
Relax your fingers.
Aim to make no mistakes.
Explanation:
Gabby needs to perform regular computer maintenance. What should she do? Check all that apply.
Answer:
all of them but B
Explanation:
Correct on edge
If a function is called more than once in a program, the values stored in the function's local variables do not _________ between function calls. g
Answer:
persist
Explanation:
Calling a function Within a program, can be regarded to as specifying of the name of the function when it is within a statement or it could be by the function itself, it possible for a particular function to call another function, in a case wherby a function returns a value, assignment or using the value to variable is not necessary. It should be noted that If a function is called more than once in a program, the values stored in the function's local variables do not persist between function calls
Write a second ConvertToInches() with two double parameters, numFeet and numInches, that returns the total number of inches.
Answer:
Answered in C++
double ConvertToInches(double numFeet, double numInches){
return numFeet*12 + numInches;
}
Explanation:
A foot is equivalent to 12 inches. So, the function converts feet to inches by multiplying the number of feet by 12.
The question is answered in C++
This line defines the method with two parameters
double ConvertToInches(double numFeet, double numInches){
This line converts the input parameters to inches and returns the number of inches
return numFeet*12 + numInches;
}
To convert 9 feet and 12 inches to inches, the main method of the program can be:
int main(){
cout<<ConvertToInches(9,12);
return 0;
}
This above will return 120 because: 9 * 12 + 12 = 120 inches
Code used when creating a hyperlink to a specific part of the same page.
Answer:
Give The Object Or Text You'd Like To Link To A Name.
Take That Name That You've Chosen, And Then Now Insert It To An Opening HTML Anchor Link Tag.
Place That Complete Opening <a> Tag From Before The Text Or Object You Want To Link It To, Then Now Add A Closing </a> tag after.
(Hope this is correct and hope this helped. Sorry if I'm wrong and you get this wrong)
To prevent long page load times for pages containing images, it is best to use a compressed file format such as JPG, as well as appropriate image dimensions and
resolution.
magnification.
orientation.
colors.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The given options to this question are:
resolution. magnification. orientation. colors.The correct option to this question is 1. i.e.
Resolution.
The resolution of an image determines how many pixels per inch an image contains. Image having a higher resolution takes long page load times for a page and lower resolution takes less page load time. So, to prevent long page load times for pages containing images, it is best to use compressed file formation as well as appropriate image dimension and resolution.
While other options are not correct because:
Magnification, orientation, and color does not affect the page load time. Page load time for images only affected by the dimension and resolution of the images.
While your hands are on home row, both of your thumbs are on _____.
Answer:
While your hands are on home row, both of your thumbs are on Space-barI know this will definitely help✍️✍️✍️what feature should be used before a document is printed
Print preview is a feature that displays on the screen what a hard copy would look like when printed. By using print preview, you can find any errors that may exist or fix the layout before printing, which can save ink or toner and paper by not having to print more than once.