Answer:
Hello! The answer to your question is function I had the same question and got it right!
Explanation:
Hope this helped:)
where did the command line first get its beginning?
Answer:
About twenty years ago Jobs and Wozniak, the founders of Apple, came up with the very strange idea of selling information processing machines for use in the home. The business took off, and its founders made a lot of money and received the credit they deserved for being daring visionaries. But around the same time, Bill Gates and Paul Allen came up with an idea even stranger and more fantastical: selling computer operating systems. This was much weirder than the idea of Jobs and Wozniak. A computer at least had some sort of physical reality to it. It came in a box, you could open it up and plug it in and watch lights blink. An operating system had no tangible incarnation at all. It arrived on a disk, of course, but the disk was, in effect, nothing more than the box that the OS came in. The product itself was a very long string of ones and zeroes that, when properly installed and coddled, gave you the ability to manipulate other very long strings of ones and zeroes. Even those few who actually understood what a computer operating system was were apt to think of it as a fantastically arcane engineering prodigy, like a breeder reactor or a U-2 spy plane, and not something that could ever be (in the parlance of high-tech) "productized."
Create a program that writes a series of random numbers to a file, then reads the file to calculate the average of those numbers, as well as the highest and lowest numbers. Prompt the user for how many random numbers they want to add to file. If the number is less than 100, add at least 100 numbers. Each random number should be between 10 and 500, inclusive (at least 10, no more than 500). Create the file as YourName_randomnumbers.txt (where YourName is your actual name or initials...) Once the program creates the file, open and read in all numbers. Loop through the numbers and determine the highest number, the lowest number, count how many entries are in the file, and calculate the average of all numbers. Remember to use functions and comment as needed. Submit your .py file and your randomnumbers.txt file.
Answer:
In Python:
import random
def average(content):
sum = 0
for i in range(0, len(content)):
content[i] = int(content[i])
sum = sum + content[i]
print("Average: "+str(round(sum/len(content),2)))
def maxList(content):
print("Highest: "+str(max(content)))
def minList(content):
print("Lowest: "+str(min(content)))
f = open("YourName_randomnumbers.txt", "w")
num = int(input("Random Numbers: "))
if num < 100:
num = 100
for i in range(1,num+1):
f.write(str(random.randint(10,500)))
f.write(" ")
f.close()
with open('YourName_randomnumbers.txt') as ff:
content = ff.read().split()
print("Entries: "+str(len(content)))
average(content)
maxList(content)
minList(content)
Explanation:
First, we import the random module
import random
The program uses functions. The first is the average function
def average(content):
This initializes sum to 0
sum = 0
This iterates through the list and adds up the list elements
for i in range(0, len(content)):
content[i] = int(content[i])
sum = sum + content[i]
This prints the average, rounded to 2 decimal places
print("Average: "+str(round(sum/len(content),2)))
The maxList function begins here
def maxList(content):
This gets and prints the highest of the list
print("Highest: "+str(max(content)))
The minList function begins here
def minList(content):
This gets and prints the lowest of the list
print("Lowest: "+str(min(content)))
The main begins here
This createa a file and prepares it for write operations
f = open("YourName_randomnumbers.txt", "w")
This prompts user for number of random numbers
num = int(input("Random Numbers: "))
If user input is less than 100
if num < 100:
It is set to 100
num = 100
The following iteration generates random numbers between 10 and 500 and inserts the random number to file
for i in range(1,num+1):
f.write(str(random.randint(10,500)))
f.write(" ")
Close file
f.close()
The following iteration reads the file content into a list
with open('YourName_randomnumbers.txt') as ff:
content = ff.read().split()
This prints the number of entries
print("Entries: "+str(len(content)))
The next three instructions calls the average, maxList and minList functions respectively
average(content)
maxList(content)
minList(content)
Which type of chart would best display data on the flavors of ice cream that customers prefer?
Answer: pie chart
Explanation: cause i said so
Pie chart is a type of chart would best display data on the flavors of ice cream that customers prefer.
What do you mean by Pie chart?A circular statistical visual with slices illustrating numerical proportion is called a pie chart. Each slice's arc length in a pie chart corresponds to the quantity it represents.
Although it was given that name because it resembles a slice of pie, there are other ways to serve it. The Statistical Breviary by William Playfair, published in 1801, is largely credited with creating the first known pie chart.
In the business sector and in the media, pie charts are used a lot. They have been criticized, though, and many experts advise against using them since it can be challenging to compare data from one pie chart to another or between numerous pie charts, according to study.
Learn more about Pie chart, here
https://brainly.com/question/9979761
#SPJ6
You are implementing a wireless network in a dentist's office. The dentist's practice is small, so you choose to use an inexpensive consumer-grade access point. While reading the documentation, you notice that the access point supports Wi-Fi Protected Setup (WPS) using a PIN. You are concerned about the security implications of this functionality. What should you do to reduce risk
Answer:
You should disable WPS in the access point's configuration.
Explanation:
Encryption is a form of cryptography and typically involves the process of converting or encoding informations in plaintext into a code, known as a ciphertext. Once, an information or data has been encrypted it can only be accessed and deciphered by an authorized user.
Some examples of encryption algorithms are 3DES, AES, RC4, RC5, and RSA.
In wireless access points, the encryption technologies used for preventing unauthorized access includes WEP, WPA, and WPA2.
In this scenario, you notice that an access point supports Wi-Fi Protected Setup (WPS) using a PIN and you are concerned about the security implications of this functionality. Therefore, to reduce this risk you should disable Wi-Fi Protected Setup (WPS) in the access point's configuration.
This ultimately implies that, the wireless access point will operate in an open state and as such would not require any form of password or PIN for use.
Consider this scenario: A major software company finds that code has been executed on an infected machine in its operating system. As a result, the company begins working to manage the risk and eliminates the vulnerability 12 days later. Which of the following statements best describes the company’s approach?
Answer:
The company effectively implemented patch management.
Explanation:
From the question we are informed about a scenario whereby A major software company finds that code has been executed on an infected machine in its operating system. As a result, the company begins working to manage the risk and eliminates the vulnerability 12 days later. In this case The company effectively implemented patch management. Patch management can be regarded as process involving distribution and application of updates to software. The patches helps in error correction i.e the vulnerabilities in the software. After the release of software, patch can be used to fix any vulnerability found. A patch can be regarded as code that are used in fixing vulnerabilities
Write a function endpoints that takes a list of numbers (eg. [5, 10, 15, 20, 25]) and returns a new list of only the first and last elements of the given list (eg. [5, 25]). If the input list is [5], the returned should be [5,5]. The function should return an empty list if an empty list is passed in. The function should not use any variables besides the passed in argument list_.
def endpoints(it) -> list: # YOUR CODE HERE raise NotImplementedError() ] ### BEGIN TESTS assert endpoints([5, 10, 15, 20, 251) -- 15, 25] **# END TESTS U # BEGIN TESTS assert endpoints([5]) - (5, 51 *** END TESTS [] ### BEGIN TESTS assert endpoints(0) -- 0 #*# END TESTS
I included a picture of my code below. Best of luck with your assignment.
Jerome falls sick after eating a burger at a restaurant. After a visit to the doctor, he finds out he has a foodborne illness. One of the symptoms of foodborne illness Jerome has is .
Jerome likely got the illness after eating food.
Answer: food poisning
Explanation:
either the food wasnt
cooked properly or the food was out of date and went bad
Package Newton’s method for approximating square roots (Case Study: Approximating Square Roots) in a function named newton. This function expects the input number as an argument and returns the estimate of its square root. The program should also include a main function that allows the user to compute the square roots of inputs from the user and python's estimate of its square roots until the enter/return key is pressed.An example of the program input and output is shown below:Enter a positive number or enter/return to quit: 2 The program's estimate is 1.4142135623746899 Python's estimate is 1.4142135623730951 Enter a positive number or enter/return to quit: 4 The program's estimate is 2.0000000929222947 Python's estimate is 2.0 Enter a positive number or enter/return to quit: 9 The program's estimate is 3.000000001396984 Python's estimate is 3.0 Enter a positive number or enter/return to quit
The python program that calculates the volume and the square of the volume is as follows
radius = float(input("Radius: "))
volume = (4.0/3.0) * (22.0/7.0) * radius**3
sqrtVolume = volume**0.5
print(f'The volume is {volume} units cubed')
print(f'The square root of that number is {sqrtVolume}')
How to write the program?The complete program written in Python where comments are used to explain each line is as follows
This gets the radius
radius = float(input("Radius: "))
#This calculates the volume
volume = (4.0/3.0) * (22.0/7.0) * radius**3
#This calculates the square root of the volume
sqrtVolume = volume**0.5
#This prints the volume
print(f'The volume is {volume} units cubed')
#This prints the square root of the volume
print(f'The square root of that number is {sqrtVolume}')
Therefore, The python program that calculates the volume and the square of the volume is as follows
radius = float(input("Radius: "))
volume = (4.0/3.0) * (22.0/7.0) * radius**3
sqrtVolume = volume**0.5
Read more about python programs at
brainly.com/question/26497128
#SPJ2
alendar year. The current calendar is called the Gregorian calendar, was introduced in 1582. Every year divisible by four was created to be a leap yer, with exception of the years ending with 00 (that is, those divisible by 100) and not divisible by 400. For instance, the years 1600 and 2000 are leap years, but 1700, 1800, and 1900 are not. Write a ptogram that requests a year as input states wether it is a leap year.
Answer
Tough question.
i dont know
Explanation:
What does the term "death by powerpoint" refer to when dealing with Powerpoint presentations?
Answer:
Death by PowerPoint is a phenomenon caused by the poor use of presentation software. Key contributors to death by PowerPoint include confusing graphics, slides with too much text and presenters whose idea of a good presentation is to read 40 slides out loud.
Explanation:
Hope this helps :)
usually it is a rectangular box placeed or underneath your desk
Answer:
Uh... there is no question here.
Explanation:
No question to answer.
— If NOT temp == 32.0 Then. Set temp = 32.0. End If.
What is the error
Answer:
im sorry so sorry i needed the pts
Explanation:
What is the maximum ream size on an agile project?
Most Agile and Scrum training courses refer to a 7 +/- 2 rule, that is, agile or Scrum teams should be 5 to 9 members. Scrum enthusiasts may recall that the Scrum guide says Scrum teams should not be less than 3 or more than 9
Explanation:
in Java programming Design a program that will ask the user to enter the number of regular working hours, the regular hourly pay rate, the overtime working hours, and the overtime hourly pay rate. The program will then calculate and display the regular gross pay, the overtime gross pay, and the total gross pay.
Answer:
In Java:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int regularhour,overtimehour;
float regularpay,overtimepay;
Scanner input = new Scanner(System.in);
System.out.print("Regular Hour: ");
regularhour = input.nextInt();
System.out.print("Overtime Hour: ");
overtimehour = input.nextInt();
System.out.print("Regular Pay: ");
regularpay = input.nextFloat();
System.out.print("Overtime Pay: ");
overtimepay = input.nextFloat();
float regulargross = regularhour * regularpay;
float overtimegross = overtimehour * overtimepay;
float totalgross = regulargross + overtimegross;
System.out.println("Regular Gross Pay: "+regulargross);
System.out.println("Overtime Gross Pay: "+overtimegross);
System.out.println("Total Gross Pay: "+totalgross);
}
}
Explanation:
This line declares regularhour and overtimehour as integer
int regularhour,overtimehour;
This line declares regularpay and overtimepay as float
float regularpay,overtimepay;
Scanner input = new Scanner(System.in);
This prompts the user for regular hour
System.out.print("Regular Hour: ");
This gets the regular hour
regularhour = input.nextInt();
This prompts the user for overtime hour
System.out.print("Overtime Hour: ");
This gets the overtime hour
overtimehour = input.nextInt();
This prompts the user for regular pay
System.out.print("Regular Pay: ");
This gets the regular pay
regularpay = input.nextFloat();
This prompts the user for overtime pay
System.out.print("Overtime Pay: ");
This gets the overtime pay
overtimepay = input.nextFloat();
This calculates the regular gross pay
float regulargross = regularhour * regularpay;
This calculates the overtime gross pay
float overtimegross = overtimehour * overtimepay;
This calculates the total gross pay
float totalgross = regulargross + overtimegross;
This prints the regular gross pay
System.out.println("Regular Gross Pay: "+regulargross);
This prints the overtime gross pay
System.out.println("Overtime Gross Pay: "+overtimegross);
This prints the total gross pay
System.out.println("Total Gross Pay: "+totalgross);
Play now? Play later?
You can become a millionaire! That's what the junk mail said. But then there was the fine print:
If you send in your entry before midnight tonight, then here are your chances:
0.1% that you win $1,000,000
75% that you win nothing
Otherwise, you must PAY $1,000
But wait, there's more! If you don't win the million AND you don't have to pay on your first attempt,
then you can choose to play one more time. If you choose to play again, then here are your chances:
2% that you win $100,000
20% that you win $500
Otherwise, you must PAY $2,000
What is your expected outcome for attempting this venture? Solve this problem using
a decision tree and clearly show all calculations and the expected monetary value at each node.
Use maximization of expected value as your decision criterion.
Answer these questions:
1) Should you play at all? (5%) If you play, what is your expected (net) monetary value? (15%)
2) If you play and don't win at all on the first try (but don't lose money), should you try again? (5%) Why? (10%)
3) Clearly show the decision tree (40%) and expected net monetary value at each node (25%)
Answer:
wow what a scam
Explanation:
What is the value of the variable answer after the following code is executed?
String strl = "apple", str2 = "banana";
boolean answer = stri.equals(str2) && (stri.length() < str2.length());
true
false
Answer:
false
Explanation:
Write a program, named sortlist, that reads three to four integers from the command line arguments and returns the sorted list of the integers on the standard output screen. You need to use strtok() function to convert a string to a long integer. For instance,
Answer:
In C++:
void sortlist(char nums[],int charlent){
int Myarr[charlent];
const char s[4] = " ";
char* tok;
tok = strtok(nums, s);
int i = 0;
while (tok != 0) {
int y = atoi(tok);
Myarr[i] = y;
tok = strtok(0, s);
i++;
}
int a;
for (int i = 0; i < charlent; ++i) {
for (int j = i + 1; j < charlent; ++j) {
if (Myarr[i] > Myarr[j]) {
a = Myarr[i];
Myarr[i] = Myarr[j];
Myarr[j] = a;
} } }
for(int j = 0;j<charlent;j++){ printf(" %d",Myarr[j]); }
}
Explanation:
This line defines the sortlist function. It receives chararray and its length as arguments
void sortlist(char nums[],int charlent){
This declares an array
int Myarr[len];
This declares a constant char s and also initializes it to space
const char s[4] = " ";
This declares a token as a char pointer
char* tok;
This line gets the first token from the char
tok = strtok(nums, s);
This initializes variable i to 0
int i = 0;
The following while loop passes converts each token to integer and then passes the tokens to the array
while (tok != 0) {
int y = atoi(tok); -> Convert token to integer
Myarr[i] = y; -> Pass token to array
tok = strtok(0, s); -> Read token
i++;
}
Next, is to sort the list.
int a;
This iterates through the list
for (int i = 0; i < charlent; ++i) {
This iterates through every other elements of the list
for (int j = i + 1; j < charlent; ++j) {
This condition checks if the current element is greater than next element
if (Myarr[i] > Myarr[j]) {
If true, swap both elements
a = Myarr[i];
Myarr[i] = Myarr[j];
Myarr[j] = a;
} } }
The following iteration prints the sorted array
for(int j = 0;j<charlent;j++){ printf(" %d",Myarr[j]); }
}
See attachment for illustration of how to call the function from main
what does coding mean
Answer: Computer coding is the use of computer programming languages to give computers and machines a set of instructions on what actions to perform. It's how humans communicate with machines. It's what allows us to create computer software like programs, operating systems, and mobile apps.
Explanation: I hope that helps
ahmed is attending a conference and wants to learn more about python lists. Which conference is mostly likely to meet ahmed's needs
New Validation Methods meets is most likely to suit Ahmed's requirements.
Define New Validation Methods ?Python validation protects third-party users from mistakenly or maliciously misusing code. It may be used to determine whether or not the input data type is valid. It may be used to see if the provided input has any incorrect values. Validation may be classified into four types:
Validation in the future.
Validation at the same time.
Validation retroactively.
Revalidation (Periodic and After Change) (Periodic and After Change)
Learn more about Python validation from here;
https://brainly.com/question/21600820
#SPJ1
application of computer in insurance
Answer:
To keep a list of insured members in the offices.
Explanation:
Compunters can be used to keep records of insured individual and their details
Write Java code to display a dialog box that asks the user to enter his or her desired annual income. Store the input in a double variable and display it in a message dialog box. public class AnnualIncome { public static void main(String[] args) { // Write your Java code here } }
Answer:
Follows are the code to the given question:
import java.util.*;//import package for user-input
public class AnnualIncome // defining a class AnnualIncome
{
public static void main(String[] as)//defining main method
{
double income;//defining double variable
Scanner obx=new Scanner(System.in);//creating Scanner class for user-input
System.out.print("Please enter your desired annual income: ");//print message
income=obx.nextDouble();//input double value
System.out.println("Your income "+income);//print value
}
}
Output:
Please enter your desired annual income: 98659.89
Your income 98659.89
Explanation:
In this code, a class "AnnualIncome" is declared, and inside the main method, the double variable "income" is defined, that uses the scanner class concept for input the value from the user-end, and in the next step, it uses the print method for asked user to enter value and it uses the print method, that prints income value with the given message.
6. Which is not considered a storage device a. USB Flash Drive b. External hard Drive c. MS-Windows d. Internal Hard Drive e. Memory Cards
Answer:
MS-Windows
Explanation:
MS-Windows is an operating system not a storage device.
1.) Define Technology
2.) List 2 examples of Technology that you use everyday
3.) The building you live in is an example of this kind of technology
4.) This is technology of making things
5.) This kind of technology helps us talk to each other.
6.) This technology helps us move from one place to another
List the operating system you recommend, and write a sentence explaining why.
Answer:
The type of operating system I reccommend really depends on how you use computers
Explanation:
If you want strict productivity/gaming: Windows
If you are a programmer/pen tester: Linux
If you want an easy interface: MacOS X
If you believe in God's third temple: Temple OS
Windows is probably the best for most users due to its balance of a simple interface and its many capabilities. It is also the best OS for gaming due to lack of support in many other OS's.
Linux is pretty much terminal-based with an interface if you need help. Only use this if you know your way around computers well. However, this OS allows you to use many tools that are impossible to use on another OS. This is the OS that many programmers, hackers, and other computer people use due to its coding-oriented environment.
If you like simple then use MacOS. The only problem is that it's only available on apple devices, so you have to pay a pretty penny to use it. This is also a unix-based OS meaning it has SOME linux capabilities.
RIP Terry A. Davis. Temple OS was designed to be the 3rd temple of God prophesized in the bible and created by Terry Davis ALONE over a bunch of years. He made this OS after receiving a revelation from God to make this. According to Davis, all other Operating Systems are inferior and Temple OS is the OS that God uses.
Write a C program that does the following: Creates a 100-element array, either statically or dynamically Fills the array with random integers between 1 and 100 inclusive Then, creates two more 100-element arrays, one holding odd values and the other holding even values (copied from the original array). These arrays might not be filled completely. Prints both of the new arrays to the console.
Answer:
Following are the code to this question:
#include <iostream>//header file
using namespace std;
int main()//main method
{
int axb[100];//defining 1-array of 100 elements
int odd_axb[100], even_axb[100];//defining two array that holds 100-elements
int i,size=0,size1=0;
for(i = 0; i < 100; i++)//defining for loop to assign value in array
{
axb[i] = rand() % 100 + 1;//using rand method to assign value with random numbers between 1 and 100
}
for(i = 0; i < 100; i++)//defining for loop that seprates array value in odd and even array
{
if(axb[i] % 2 == 0)//checking even condition
{
even_axb[size++] = axb[i];//holding even number
}
else//else block
{
odd_axb[size1++] = axb[i];//holding Odd number
}
}
//printing values
cout << "Odd array: ";//print message
for(i = 0; i <size1; i++)//use for loop for print odd numbers
{
cout << odd_axb[i]<<" ";//printing values
}
cout <<"\n\n"<< "Even array: ";//print message
for(i = 0; i <size; i++)//use for loop for print even_axb numbers
{
cout << even_axb[i] << " ";//printing values
}
return 0;
}
Output:
Odd array: 87 87 93 63 91 27 41 27 73 37 69 83 31 63 3 23 59 57 43 85 99 25 71 27 81 57 63 71 97 85 37 47 25 83 15 35 65 51 9 77 79 89 85 55 33 61 77 69 13 27 87 95
Even array: 84 78 16 94 36 50 22 28 60 64 12 68 30 24 68 36 30 70 68 94 12 30 74 22 20 38 16 14 92 74 82 6 26 28 6 30 14 58 96 46 68 44 88 4 52 100 40 40
Explanation:
In the above-program, three arrays "axb, odd_axb, and even_axb" is defined, that holds 100 elements in each, in the next step, three integer variable "i, size, and size1" is defined, in which variable "i" used in the for a loop.
In the first for loop, a rand method is defined that holds 100 random numbers in the array, and in the next, for-loop a condition statement is used that separates even, odd number and store its respective array, and in the last for loop, it prints its store values
Where can I watch jersey shore for free
Pls don’t say soap2day, any apps or something?
Answer:
maybe try Y o u t u b e
Explanation:
sometimes they have full episodes of shoes on there for free
the keyboard,mouse, display,and system units are:
Answer:
input devices?
Explanation:
Keyboard: It is used to give input through typing of the keys in keyboard. Mouse: It is used to give input through clicking mouse or selecting the options. System unit: It collectively defines the motherboard and CPU of the computer.
The keyboard, mouse, display, and system units are the four main components of a computer system.
Given that,
The devices are Keyboard, Mouse, Display, and System units.
A computer comprises hardware and software.
The hardware is the devices that are used for the input and output of the data.
The software is the devices that are integrated into the devices of the computer. This processes the data and provides the result.
The output devices show the result of our actions on the computer. Example: Screen.
The storage devices are used to store the data which are given as input. Example: Hard disk.
Thus, these all come under the hardware devices of the computer.
Read more on computer hardware here:
brainly.com/question/959479
#SPJ6
How does PowerPoint know which objects to group? The objects are aligned side by side. The objects are placed in one part of the slide. The objects are selected using the Ctrl key. The objects are highlighted and dragged together.
Answer:the objects are selected using the Ctrl key
Explanation:
Just took it
Answer: C
Explanation:
What styles can the calendar be printed in? Check all that apply.
Quick
Daily style
Weekly Agenda style
Weekly Calendar style
Monthly Agenda style
Monthly style
Bifold style
Trifold style
Answer:
Daily style
Weekly Agenda style
Weekly Calendar style
Monthly style
Trifold style
or
B, C, D, F, H
A car dealership needs a program to store information about the cars for sale. For each car, they want to keep track of the following information number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon. Which of the following is the best design?
a. Use classes: Doors, Airconditioning, and MilesPerGallon, each with a subclass Car.
b. Use a class Car, with subclasses of Doors, Airconditioning, and MilesPerGallon.
c. Use a class Car with three subclasses: Doors, Airconditioning, and MilesPerGallon.
d. Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.
e. Use four unrelated classes: Car, Doors, Airconditioning, and MilesPerGallon.
Answer:
The answer is "Choice d".
Explanation:
In this topic, the option d, which is "Use a class Car, with fields: numDoors, hasAir, and milesPerGallon" is right because the flag, if air-conditioned, of its numbers of doors, was its average kilometers per gallon, qualities of either an automobile, in which each one is a basic value so that they're being fields of a class of cars.
The best design for the given program will be;
D: Use a class Car, with fields: numDoors, hasAir, and milesPerGallon.
What is the best design for the program?In this question, the best design for the program to keep track of the number of doors (2 or 4), whether the car has air conditioning, and its average number of miles per gallon is to "Use a class Car, with fields: numDoors, hasAir, and milesPerGallon"
That option is right because has classified the cars with the accurate parameters to be searched which are its numbers of doors, average miles per gallon, air condition.
Read more about programming at; https://brainly.com/question/22654163