Answer:
Melon
Explanation:
The variable "list" containts a function that returns a price that is greater than or equal to 60.0.
In the variable "fruit", the only item in the array with a price attribute set above that number is the string Melon.
Write a program to prompt the user for hours and rate per hour using input to compute gross pay.
Pay should be the normal rate for hours up to 40 and time-and-a-half for the hourly rate for all hours worked above 40 hours.
Put the logic to do the computation of pay in a function called computepay() and use the
function to do the computation. The function should return a value. Use 45 hours and a rate of 10.50 per hour to test the program (the pay should be 498.75).
You should use input to read a string and float to convert the string to a number. Do not worry about error checking the user input unless you want to - you can assume the user types numbers properly. Do not name your variable sum or use the sum() function.
def computepay(h,r):
if h > 40:
pay = 40 * r
h -= 40
pay += (r*1.5) * h
else:
pay = h*r
return pay
print(computepay(float(input("How many hours did you work? ")),float(input("What is your rate of pay"))))
I hope this helps!
1. A network administrator was to implement a solution that will allow authorized traffic, deny unauthorized traffic and ensure that appropriate ports are being used for a number of TCP and UDP protocols.
Which of the following network controls would meet these requirements?
a) Stateful Firewall
b) Web Security Gateway
c) URL Filter
d) Proxy Server
e) Web Application Firewall
Answer:
Why:
2. The security administrator has noticed cars parking just outside of the building fence line.
Which of the following security measures can the administrator use to help protect the company's WiFi network against war driving? (Select TWO)
a) Create a honeynet
b) Reduce beacon rate
c) Add false SSIDs
d) Change antenna placement
e) Adjust power level controls
f) Implement a warning banner
Answer:
Why:
3. A wireless network consists of an _____ or router that receives, forwards and transmits data, and one or more devices, called_____, such as computers or printers, that communicate with the access point.
a) Stations, Access Point
b) Access Point, Stations
c) Stations, SSID
d) Access Point, SSID
Answer:
Why:
4. A technician suspects that a system has been compromised. The technician reviews the following log entry:
WARNING- hash mismatch: C:\Window\SysWOW64\user32.dll
WARNING- hash mismatch: C:\Window\SysWOW64\kernel32.dll
Based solely ono the above information, which of the following types of malware is MOST likely installed on the system?
a) Rootkit
b) Ransomware
c) Trojan
d) Backdoor
Answer:
Why:
5. An instructor is teaching a hands-on wireless security class and needs to configure a test access point to show students an attack on a weak protocol.
Which of the following configurations should the instructor implement?
a) WPA2
b) WPA
c) EAP
d) WEP
Answer:
Why:
Network controls that would meet the requirements is option a) Stateful Firewall
Security measures to protect against war driving: b) Reduce beacon rate and e) Adjust power level controlsComponents of a wireless network option b) Access Point, StationsType of malware most likely installed based on log entry option a) RootkitConfiguration to demonstrate an attack on a weak protocol optio d) WEPWhat is the statement about?A stateful firewall authorizes established connections and blocks suspicious traffic, while enforcing appropriate TCP and UDP ports.
A log entry with hash mismatch for system files suggest a rootkit is installed. To show a weak protocol attack, use WEP on the access point as it is an outdated and weak wireless network security protocol.
Learn more about network administrator from
https://brainly.com/question/28729189
#SPJ1
Provide an example where a company has demonetized a market or industry.
What best describes how machine learning applications work?
Note that Machine learning algorithms analyze data and learn from it to make predictions or decisions without being explicitly programmed for a specific task.
What is machine learning?Machine learning is a type of artificial intelligence that involves training algorithms to learn from data and make predictions or decisions without being explicitly programmed to perform a specific task.
This technology work by using algorithms to analyze data and learn from it, without being explicitly programmed to perform a specific task. These algorithms can be trained on a dataset, which is a collection of data that is used to teach the algorithm to recognize patterns and make predictions or decisions. The algorithm uses the data to learn about the relationships and patterns within the data, and can then use this knowledge to make predictions or decisions about new data.
The accuracy of the predictions or decisions made by the machine learning algorithm improves as it is exposed to more data and is able to learn from it.
Learn more about Machine Learning:
https://brainly.com/question/16042499
#SPJ1
The executive ________ is the person ultimately responsible to their company for the project's success.
fill in blank
Answer:
Manager.
Explanation:
Just thank me later and make sure to click the crown at the top of this answer ;)
Answer:
sponsor i took the test
Explanation:
Usually senior executives, executive sponsors, are the ones ultimately responsible to their company for the project's success.
Which of the following best describes the basic purpose of the internet?
A. The internet protects the privacy of sensitive information.
B. The internet sends information from one computer to another.
C. The internet stores data.
D. The internet connects input and output devices to a computer.
The best description of the basic purpose of the internet is that internet sends information from one computer to another. The correct option is B.
What is the importance of the internet?The internet was developed so that you can quickly get solutions to your questions there. People utilize it every day to learn something new, and it can mean anything. The internet aids in understanding pretty much anything.
Computers all over the world are connected by a huge global network called the Internet. People can share information and converse via the Internet from any location with an Internet connection.
The most significant tool and well-known resource used by practically everyone in the world is the internet. It links countless numbers of servers, webpages, and websites. We may communicate with our loved ones online by sending emails, images, videos, and messages.
Therefore, the correct option is B. The internet sends information from one computer to another.
To learn more about the internet, visit here:
https://brainly.com/question/13308791
#SPJ6
What are the uses of computer in educational setting?
Answer:
Quick Communication & Correspondence
Explanation:
Another main advantage of using computers in the education field is the improvement in the quality of teaching-learning process and communication between students & teachers. For this, they use Microsoft PowerPoint to prepare electronic presentations about their lectures.
Answer:
there are different uses of computer in education setting fact from its application include
E learninginstructional materialE examease of communicationstorageCan someone explain to me how to use the while loop for this exercise?
Answer:
To use a while loop for this exercise, you would first initialize a variable, such as "counter," to 0. Then, you would set up the while loop so that it continues to run as long as the value of "counter" is less than the total number of sections you have in your data set. Within the while loop, you would include instructions to read in the data for each section, such as using the input() function to prompt the user for the course number, section, and meeting time and location. You would then use an if statement to check if the course is an online course, and if so, you would print "online" in place of the meeting time and location. Finally, you would increment the "counter" variable by 1 at the end of each iteration of the while loop so that the loop eventually terminates when all sections have been read in and printed.
Answer:
Explanation:
There is insufficient information to accurately respond but I have done in a simple manner.
Since I don't know what the contents of the two python files referred to in the document, I have used my own formatting method and check for moving to a newline.
Also, don't know how the data is inputted; I have assumed that the data is in a file called data.txt
There are more elegant ways t do this but I have done this quickly and simply
with open("data.txt") as f: # open file for reading
data = f.read() # read all data
lines = data.split() #split data into individuals
i = 1 #counter to track how many lines outputted
for line in lines: # for each item in lines
print('{:20s}'.format(line), end = '') # suppress line feed
if i % 3 == 0: #check to see if 3 items printed out
print() # if so, print new line
i+=1 #increment counter
f.close() # close file - not necessary if using open
Python The Sieve of Eratosthnes Prgram
A prime integer is any integer greater than 1 that is evenly divisible only by itself and 1. The Sieve of Eratosthenes is a method of finding prime numbers. It operates as follows:
Create a list with all elements initialized to 1 (true). List elements with prime indexes will remain 1. All other elements will eventually be set to zero.
Starting with list element 2, every time a list element is found whose value is 1, loop through the remainder of the list and set to zero every element whose index is a multiple of the index for the element with value 1. For list index 2, all elements beyond 2 in the list that are multiples of 2 will be set to zero (indexes 4, 6, 8, 10, etc.); for list index 3, all elements beyond 3 in the list that are multiples of 3 will be set to zero (indexes 6, 9, 12, 15, etc.); and so on.
When this process is complete, the list elements that are still set to 1 indicate that the index is a prime number. These indexes can then be printed. Write a program that uses a list of 1000 elements to determine and print the prime numbers between 2 and 999. Ignore element 0 of the list. The prime numbers must be printed out 10 numbers per line.
Sample Executions:
Prime numbers between 2 and 999 as determined by the Sieve of Eratosthenes.
2 357 11 13 17 19 23 29
31 37 41 43 47 53 59 61 67 71
73 79 83 89 97 101 103 107 109 113
127 131 137 139 149 151 157 163 167 173
179 181 191 193 197 199 211 223 227 229
233 239 241 251 257 263 269 271 277 281
283 293 307 311 313 317 331 337 347 349
353 359 367 373 379 383 389 397 401 409
419 421 431 433 439 443 449 457 461 463
467 479 487 491 499 503 509 521 523 541
547 557 563 569 571 577 587 593 599 601
607 613 617 619 631 641 643 647 653 659
661 673 677 683 691 701 709 719 727 733
739 743 751 757 761 769 773 787 797 809
811 821 823 827 829 839 853 857 859 863
877 881 883 887 907 911 919 929 937 941
947 953 967 971 977 983 991 997
Answer:
try this
Explanation:
def SieveOfEratosthenes(n):
prime = [True for i in range(n+1)]
p = 2
while (p * p <= n):
if (prime[p] == True):
for i in range(p * p, n+1, p):
prime[i] = False
p +=1
c=0
for p in range(2, n):
if prime[p]:
print(p," ",end=" ")
c=c+1
if(c==10):
print("")
c=0
n= 1000
print("prime number between 2 to 999 as determined by seive of eratostenee ")
SieveOfEratosthenes(n)
Scenario
A game developer has asked you to help build a card game. Your task is to allow the user to
pick the cards from the deck.
1. Random Numbers
Type the following code to pick a random number between 1 and 4:
import random
randomNum = random.randint(1,4)
print (randomNum)
2. Choosing a suit
Define a function called chooseSuit(number)
This code MUST go in between the import random line and the rest of the program.
Inside the function use an if..elif block that will turn each number into a suit
def chooseASuit (number):
if number
1:
suit
"Hearts" |
The function should return the value of suit at the end.
3. Calling the function
At the end of the program, call the chooseASuit function, passing the randomNum and
storing the answer in a variable called suit
4. Card Value
Define a function that will convert the values 1, 11, 12 and 13 to Ace, Jack, Queen
and King Capture the response in a variable called value.
5. Finally
The program should print "Your card is the 3 of clubs" (or something similar).
Make this happen 10 times.
In order to facilitate the selection of cards from a deck during a card game, the random module in Python can be utilized.
How to incorporate the random module?By incorporating the random module into our code and invoking the randint function, we can produce a random numerical value ranging from 1 to 4, which can be attributed to the individual cards in our deck.
The following code can be utilized to accomplish this task.
import random
randomNum = random.randint(1,4)
print(randomNum)
The randomly generated number can serve as a tool to identify the exact card selected by the user from the deck. The aforementioned procedure is applicable to every card chosen by the player throughout the game.
Read more about programs here:
https://brainly.com/question/23275071
#SPJ1
Type the correct answer in the box. Spell all words correctly.
Julio Is a manager in an MNC. He has to make a presentation to his team regarding the life cycle of the current project. The life cycle should
follow a specific sequence of steps. Which style of presentation is best suited for Julio's purpose?
Jullo should make a presentation
Reset
Next
s reserved.
Answer:
Julio is a manager at an MNC. He has to make a presentation to his team regarding the life cycle of the current project. The life cycle should follow a specific sequence of steps. Which style of presentation is best suited for Julio's purpose? Jullo should give a speech.
Explanation:
Answer: linear
Explanation:
Just got it right. Linear presentations are sequential.
Each week, the Pickering Trucking Company randomly selects one of its 30
employees to take a drug test. Write an application that determines which
employee will be selected each week for the next 52 weeks. Use the Math.
random() function explained in Appendix D to generate an employee number
between 1 and 30; you use a statement similar to:
testedEmployee = 1 + (int) (Math.random() * 30);
After each selection, display the number of the employee to test. Display four
employee numbers on each line. It is important to note that if testing is random,
some employees will be tested multiple times, and others might never be tested.
Run the application several times until you are confident that the selection is
random. Save the file as DrugTests.java
In the Java program provided, a class named Main is formed, and inside of that class, the main method is declared, where an integer variable named "testedEmployee" is declared. The loop is then declared, and it has the following description.
How is a random number generated?RAND() * (b - a) + a, where an is the smallest number and b is the largest number that we wish to generate a random number for, can be used to generate a random number between two numbers. A random method is used inside the loop to calculate the random number and print its value. A variable named I is declared inside the loop. It starts at 1 and stops when its value is 52.The following step defines a condition that, if true, prints a single space if the check value is divisible by 4.In the Java program provided, a class named Main is formed, and inside of that class, the main method is declared, where an integer variable named "testedEmployee" is declared. The loop is then declared, and it has the following description.To learn more about Java program refer to:
https://brainly.com/question/25458754
#SPJ1
Write a function predict_wait that takes a duration and returns the predicted wait time using the appropriate regression line, depending on whether the duration is below 3 or greater than (or equal to) 3.
The appropriate function which could be used to model the scenario can be written thus ; The program is written in python 3 ;
y = 3x + 3.5
#since no data is given ; using an hypothetical regression equation expressed in slope - intercept format ; where, x = duration and y = Predicted wait time.
def predict_wait(x) :
#initialize a function named predict_wait and takes in a certain duration value, x
y = 3*x + 3.5
#input the x - value into the regression equation to calculate y
return y
#return y
Learn more : https://brainly.com/question/25556810
AppWhich is the same class of lever as a broom?
A. A boat oar.
E
B. A baseball bat.
OC. A wheelbarrow.
D. A pair of scissors.
Answer:
A. boat oar is your answer hope it helped
When you program in a language that uses GUI components, you need to create them from scratch.
a. True
b. False
Answer:
B. False
Explanation:
You do NOT need to start from scratch when you program in a language that uses GUI components. You can think of it like the components are add-ons to your programming language.
Answer:
The correct answer is b. False
Explanation:
You don't need to create them from scratch.
Hope this helps!
Which tags should be bolded?
Explanation:
As per the nature and importance of the context the certain words can be bolded to make them prominent.
It also refers to the type of sentence either .
negative interrogative simple sentenceb) Use method from the JOptionPane class to request values from the user to initialize the instance variables of Election objects and assign these objects to the array. The array must be filled.
The example of the Java code for the Election class based on the above UML diagram is given in the image attached.
What is the Java code about?Within the TestElection class, one can instantiate an array of Election objects. The size of the array is determined by the user via JOptionPane. showInputDialog()
Next, one need to or can utilize a loop to repeatedly obtain the candidate name and number of votes from the user using JOptionPane. showInputDialog() For each iteration, one generate a new Election instance and assign it to the array.
Learn more about Java code from
https://brainly.com/question/18554491
#SPJ1
See text below
Question 2
Below is a Unified Modelling Language (UML) diagram of an election class. Election
-candidate: String
-num Votes: int
<<constructor>> + Election ()
<<constructor>> + Election (nm: String, nVotes: int)
+setCandidate( nm : String)
+setNum Votes(): int
+toString(): String
Using your knowledge of classes, arrays, and array list, write the Java code for the UML above in NetBeans.
[7 marks]
Write the Java code for the main method in a class called TestElection to do the following:
a) Declare an array to store objects of the class defined by the UML above. Use a method from the JOptionPane class to request the length of the array from the user.
[3 marks] b) Use a method from the JOptionPane class to request values from the user to initialize the instance variables of Election objects and assign these objects to the array. The array must be filled.
Marianne needs to create a version of her slide presentation that does not include all the slides and will be used for
a particular audience. What is the best way for her to achieve this?
A.) Use the Custom Show dialog box to create a new custom show.
B.) Use the Hide slides option.
C.) Create a new presentation and add the appropriate slides.
D.) Delete and recreate the presentation with the appropriate slides.
Answer:
B is the correct answer because that's what I do
Answer:
I'd say option B would be easiest
Explanation:
Instead of having to delete or completely re do certain slides hiding certain slides would probably work best and save some time.
In JAVA with comments: Consider an array of integers. Write the pseudocode for either the selection sort, insertion sort, or bubble sort algorithm. Include loop invariants in your pseudocode.
Here's a Java pseudocode implementation of the selection sort algorithm with comments and loop invariants:
```java
// Selection Sort Algorithm
public void selectionSort(int[] arr) {
int n = arr.length;
for (int i = 0; i < n - 1; i++) {
int minIndex = i;
// Loop invariant: arr[minIndex] is the minimum element in arr[i..n-1]
for (int j = i + 1; j < n; j++) {
if (arr[j] < arr[minIndex]) {
minIndex = j;
}
}
// Swap the minimum element with the first element
int temp = arr[minIndex];
arr[minIndex] = arr[i];
arr[i] = temp;
}
}
```The selection sort algorithm repeatedly selects the minimum element from the unsorted part of the array and swaps it with the first element of the unsorted part.
The outer loop (line 6) iterates from the first element to the second-to-last element, while the inner loop (line 9) searches for the minimum element.
The loop invariant in line 10 states that `arr[minIndex]` is always the minimum element in the unsorted part of the array. After each iteration of the outer loop, the invariant is maintained.
The swap operation in lines 14-16 exchanges the minimum element with the first element of the unsorted part, effectively expanding the sorted portion of the array.
This process continues until the entire array is sorted.
Remember, this pseudocode can be directly translated into Java code, replacing the comments with the appropriate syntax.
For more such questions on pseudocode,click on
https://brainly.com/question/24953880
#SPJ8
A tech class question any help will be greatly apprieciated
Why would a programmer use a software artifact, such as a flowchart?
Answer:
With a code artifact, a software programmer can test the program in detail and perfect things before launching the software. The program can easily pass the testing phase for a project management artifact without any problems if errors are corrected at the level of the coding
Explanation:
:)
Output: Look at the questions and choices on page 999 of your textbook. Enter the UPPERCASE letter of your choice for each question when prompted below. Enter your response for Question 1: [user types: a] Enter your response for Question 2: [user types: D] Enter your response for Question 3: [user types: B] Enter your response for Question 4: [user types: b] Enter your response for Question 5: [user types: A] You answered 4 out of 5 questions correctly
Answer:
The program in C++ is as follows:
#include <iostream>
using namespace std;
char input(){
char student; cin>>student;
return student;
}
int compare(char student, char teacher){
int score = 0;
if(tolower(student) == tolower(teacher)){ score++;
}
return score;
}
int main(){
char teacher[5] = {'C', 'D', 'B', 'B', 'A'};
int score = 0;
for (int i = 0;i<5;i++){
cout<<"Question "<<i+1<<": ";
char student = input();
score+= compare(student,teacher[i]);
}
cout<<"You answered "<<score<<" out of 5 questions correctly";
return 0;
}
Explanation:
Given
See attachment (1) for complete question
See attachment (2) for complete source file where comment are used to explain
Which term describes the traditional methodology of project management and software development?
Answer:
Waterfall Methodology
Explanation:
Waterfall Methodology is a process in which events occur in a predictable sequence.
how many jobs can you get without a college degree
what's another name for white -colored wire?
A. grounded conductor
B.Grounding conductor
C.Hot
D.Hot neutral
Answer:
A
Explanation:
A. The correct answer is A. "Grounded conductor" is another name for a white-colored wire. It is also commonly referred to as a neutral wire.
Answer:A. grounded conductor. I hope this helps
Explanation:
The correct answer is A. Grounded conductor. The grounded conductor is also commonly referred to as the neutral wire and is typically color-coded white
A. Grounded conductor is another name for white-colored wire. The grounded conductor is also commonly referred to as the neutral wire, which carries current back to the source. It is distinguished from the hot wire which carries the current to the loads. The grounding conductor, on the other hand, is typically green or bare and serves to ground the system for safety purposes
Operating Expenses for a business includes such things as rent, salaries, and employee benefits.
Answer:
TRUE
Explanation:
What is the correct formula for the IF function in excel
Use the IF function, one of the logical functions, to return one value if a condition is true and another value if it's false. For example: =IF(A2>B2,"Over Budget","OK") =IF(A2=B2,B4-A4,"")
The IF function in Microsoft Excel is the most common function in Excel that allows comparing the data.
The IF function can have two statements that is positive and negative. Like of IF(C2='' Yes'', 1, 2). Which means of c2 is yes then return one or two. Thus IF formula is used to evaluate errors.Learn more about the correct formula for the IF function in excel.
brainly.in/question/5667072.
Part 2 Graduate Students Only Architectural simulation is widely used in computer architecture studies because it allows us to estimate the performance impact of new designs. In this part of the project, you are asked to implement a pseudo-LRU (least recently used) cache replacement policy and report its performance impact. For highly associative caches, the implementation cost of true LRU replacement policy might be too high because it needs to keep tracking the access order of all blocks within a set. A pseudoLRU replacement policy that has much lower implementation cost and performs well in practice works as follows: when a replacement is needed, it will replace a random block other than the MRU (most recently used) one. You are asked to implement this pseudo-LRU policy and compare its performance with that of the true LRU policy. For the experiments, please use the default configuration as Question 3 of Project Part 1, fastforward the first 1000 million instructions and then collect detailed statistics on the next 500 million instructions. Please also vary the associativity of L2 cache from 4 to 8 and 16 (the L2 size should be kept as 256KB). Compare the performance of the pseudo-LRU and true-LRU in terms of L2 cache miss rates and IPC values. Based on your experimental results, what is your recommendation on cache associativity and replacement policy? Please include your experimental results and source code (the part that has been modified) in your report. Hint: The major changes of your code would be in cache.c.
The outline that a person can use to implement as well as compare the pseudo-LRU and that of the true-LRU cache replacement policies is given below
What is the code about?First, one need to make changes the cache replacement policy that can be see in the cache.c file of a person's code.
Thereafter one need to Run simulations with the use of the already modified or changed code via the use of the default configuration as said in Question 3 of Project Part 1.
Therefore, one can take detailed statistics, such as L2 cache miss rates and IPC (Instructions Per Cycle) values, for all of the next 500 million instructions. etc.
Learn more about code from
https://brainly.com/question/26134656
#SPJ1
Where do charts get the data series names?
O data entries
O row labels
O column labels
O worksheet title
Answer:
B) Row labels
Explanation:
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
Python help
Instructions
Write a method swap_values that has three parameters: dcn, key1, and key2. The method should take the value in
the dictionary den stored with a key of key1 and swap it with the value stored with a key of key2. For example, the
following call to the method
positions = {"C": "Anja", "PF": "Jiang", "SF": "Micah", "PG": "Devi", "SG": "Maria")
swap_values (positions, "C", "PF")
should change the dictionary positions so it is now the following:
{'C': 'Jiang', 'PF': 'Anja', 'SF': 'Micah', 'PG': 'Devi', 'SG': 'Maria')
def swap_values(dcn, key1, key2):
temp = dcn[key1]
dcn[key1] = dcn[key2]
dcn[key2] = temp
return dcn
The method in the interface for a dictionary collection returns an iterator on the key/value pairs in the dictionary is the Keys () method.
Consider the scenario where you want to develop a class that functions like a dictionary and offers methods for locating the key that corresponds to a specific target value.
You require a method that returns the initial key corresponding to the desired value. A process that returns an iterator over those keys that map to identical values is also something you desire.
Here is an example of how this unique dictionary might be used:
# value_dict.py
class ValueDict(dict):
def key_of(self, value):
for k, v in self.items():
if v == value:
return k
raise ValueError(value)
def keys_of(self, value):
for k, v in self.items():
if v == value:
yield k
Learn more about Method on:
brainly.com/question/17216882
#SPJ1