Maintain a Database Security (Inference Detection Algorithm)


Consider a database containing personnel information, including names, addresses, and salaries of employees. Individually, the name, address, and salary information is available to a subordinate role, such as Clerk, but the association of names and salaries is restricted to a superior role, such as Administrator.


1. With this information, how could you construct your database and tables? Design your database and draw a database schema first.


2. Suppose that administrators wants to add a new attribute, employee start date, which is not sensitive. Where would it be? Consider not comprimising the relationship between employee and salary. Draw your new schema

Answers

Answer 1

To maintain database security and prevent unauthorized access to sensitive information, we can use an inference detection algorithm. This algorithm monitors queries and user activity to detect any attempts to infer sensitive information from available data.

1. To maintain database security and protect the sensitive association between names and salaries, you can construct your database using two separate tables. The first table, called 'Employee_Info', will store general information about employees, such as their names and addresses. The second table, named 'Salary_Info', will store salary data. Both tables will have a unique Employee_ID as the primary key to link the records without directly associating names and salaries.
Database schema:
Employee_Info
- Employee_ID (Primary Key)
- Name
- Address

Salary_Info
- Employee_ID (Primary Key)
- Salary

2. To add the new attribute 'employee start date' without compromising the relationship between employee and salary, you can include this attribute in the 'Employee_Info' table, since it is not sensitive information. The updated schema would be as follows:
Updated Database schema:
Employee_Info
- Employee_ID (Primary Key)
- Name
- Address
- Start_Date

Salary_Info
- Employee_ID (Primary Key)
- Salary

Learn more about database; https://brainly.com/question/24027204

#SPJ11


Related Questions

Write c program (without arrays or pointers)


(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7. 99 for up to 10 hours of connection time. Additional hours or partial hours are charged at $1. 99 each. Write a function charges that computes the total charge for a customer based on the number of hours of connection time used in a month. The function should also calculate the average cost per hour of the time used (rounded to the nearest 0. 01), so use two output parameters to send back these results. You should write a second function round_money that takes a real number as an input argument and returns as the function value the number rounded to two decimal places. Write a main function that takes data from an input file usage. Txt and produces an output file charges. Txt. The data file format is as follows: Line 1: current month and year as two integers Other lines: customer number (a five-digit number) and number of hours used Here is a sample data file and the corresponding output file: Data file usage. Txt 10 2009 15362 4. 2 42768 11. 1 11111 9. 9 Output file charges. Txt Charges for 10/2009 15362 4. 2 7. 99 1. 90 42768 11. 1 10. 18 0. 92 11111 9. 9 7. 99 0. 81

Answers

The program extracts customer data from a designated file, "usage.txt", and calculates the total fees and hourly average expenses for every customer.

What is the c program?

The fprintf function is utilized to document the outcomes in a file called "charges.txt". To obtain the average cost per hour rounded to two decimal places, one can utilize the round_money function.

So, The resulting document displays the fees paid by every client, which comprise the aggregate amount of utilized hours, overall fee incurred, and the mean cost per hour rounded off to two decimal places.

Learn more about  c program from

https://brainly.com/question/26535599

#SPJ4

Greg works for an online games development company. He occasionally visits online literature sites and downloads e-books of his choice (unrelated to the gaming industry) while at work. Has Greg violated any professional code of conduct, and why?

Answers

Yes, Greg has violated the professional code of conduct.

How did Greg violate conduct ?

Downloading e-books that are not related to work during working hours is regarded as misconduct and also considered a breach of company policy.

Such behavior can cause a loss in productivity and ultimately waste valuable company resources. Therefore, it is imperative for employees to abide by the professional code of conduct and company policies in order to maintain a positive workplace environment focused on ethical and responsible behavior.

Find out more on violations of conduct at https://brainly.com/question/31000678

#SPJ4

11. In cell F15, insert a Column sparkline based on the data in the range B15:E15. Fill cell F16 without formatting based on the contents of cell F15. Display the High Point and the Low Point in the sparklines. IN EXCEL

Answers

To insert a Column sparkline based on the data in the range B15:E15 in cell F15 and display the High Point and the Low Point in the sparklines in Excel, follow these steps.

What are the steps?

Click on cell F15.Go to the "Insert" tab in the ribbon.Click on the "Column" option in the "Sparklines" group.In the "Create Sparklines" dialog box, set the "Data Range" to "B15:E15".In the "Location Range" box, select cell F15.Check the "High Point" and "Low Point" boxes under "Show" in the "Create Sparklines" dialog box.Click "OK".

The sparkline will now be displayed in cell F15, with the High Point and the Low Point shown. To fill cell F16 with the contents of cell F15 without formatting, follow these steps:

Click on cell F16.

Type "=F15" in the formula bar.

Press Enter.

The contents of cell F15 will now be copied into cell F16 without any formatting.

Learn more about EXCEL at:

https://brainly.com/question/31409683

#SPJ1

Use the _____ option at the arrange windows dialog box to display one open workbook on top and the title bars of the other open workbooks behind it.

Answers

Use the Cascade option at the arrange windows dialog box to display one open workbook on top and the title bars of the other open workbooks behind it.

This feature organizes multiple open workbooks in a cascading format, allowing you to easily access and navigate between them.

To use the Cascade option, follow these steps:

1. Click on the "View" tab in the Excel ribbon.

2. In the "Window" group, click on the "Arrange All" button.

3. A dialog box will appear. Select the "Cascade" option and click "OK."

This will arrange your open workbooks with one on top and the others cascading behind it, making it convenient to manage and switch between multiple workbooks in Excel.

Learn more about cascade at

https://brainly.com/question/30733005

#SPJ11

who is the father of computer ​

Answers

Answer:

Charles Babbage

Explanation:

An exceptionally gifted scientist, mathematician, economist, and engineer, Charles Babbage also invented the computer. It is difficult to envision living in the twenty-first century without computers. They are all around us, simplify our lives, and are found everywhere. Banks, government agencies, commercial businesses, and institutions engaged in space exploration all use computers.

ITS A GAME DESIGN CLASS ONLY ANSWER IF YOU KNOW OR GOT A 100 ON THIS.




Using complete sentences post a detailed response to the following.



Consider the game you are developing. Describe the various kinds of data you will need to model for your game (specific to each action) across the following categories: integer, float, Boolean, character, Vector3, quaternion. You should come up with AT LEAST SIX examples

Answers

Game development often requires the use of various data types, such as integers, floats, booleans, characters, vectors, and quaternions, to accurately represent different aspects of the game world and ensure proper functionality.

Here are six examples of data types that may be needed in your game development across different categories:

1. Integer:

Score: To keep track of the player's progress or performance.

Level: To represent the current level or stage the player is in.

Health Points (HP): To measure the player's health or vitality.

Experience Points (XP): To track the player's progression and leveling up.

Currency: To manage in-game currency or virtual money.

Time: To record time-based events or timers.

2. Float:

Damage: To calculate the amount of damage inflicted by a weapon or ability.

Speed: To determine the movement speed of characters or objects.

Accuracy: To measure the precision or accuracy of player actions.

Distance: To track the distance traveled by the player or objects.

Duration: To manage the duration of temporary effects or power-ups.

Scale: To adjust the size or scale of objects in the game world.

3. Boolean:

IsAlive: To determine if a character or enemy is alive or defeated.

IsEnabled: To control the visibility or interactivity of game elements.

IsTriggered: To indicate if a specific event or condition has occurred.

IsCompleted: To mark the completion status of quests or objectives.

IsPaused: To manage the state of the game, such as pausing or resuming.

IsLocked: To represent locked or unlocked content or levels.

4. Character:

PlayerName: To store the name or identifier of the player character.

NPCName: To assign names to non-player characters (NPCs).

CharacterClass: To define the class or archetype of a character (e.g., warrior, mage, rogue).

CharacterType: To categorize characters based on their role or attributes.

CharacterLevel: To track the level or experience progression of characters.

CharacterAppearance: To store visual customization options for characters.

5. Vector3:

Position: To represent the position of characters, objects, or waypoints in a 3D space.

Velocity: To track the speed and direction of moving objects.

TargetPosition: To store the desired destination or target location.

Force: To apply physics-based forces to objects, such as gravity or explosions.

SpawnPoint: To define the spawn location for characters or items.

LookDirection: To determine the orientation or facing direction of characters or cameras.

6. Quaternion:

Rotation: To represent the rotation of objects in a 3D space.

Orientation: To define the facing direction or alignment of characters or objects.

CameraRotation: To control the rotation of the game camera.

ProjectileRotation: To determine the trajectory or direction of projectiles.

JointRotation: To manage the rotation of character joints or articulated objects.

TargetRotation: To store the desired rotation or look-at direction.

Remember that the specific data requirements for your game may vary based on its genre, mechanics, and design. These examples provide a starting point to consider the types of data that could be modeled in a game.


These examples illustrate how various data types can be used to model different aspects of your game, ensuring accurate representation and functionality.

Know more about the data types click here:

https://brainly.com/question/31913438

#SPJ11

Difficulty: moderate

exercise 6 (4 points):

**create a function in a file that begins with

function q-markov (p, x0)

format

n=size (p,1);

q-1);

**first, the function has to check whether the given matrix p (that will have positive entries)

is stochastic, that is, left-stochastic. if p is not left-stochastic, the program displays a message

disp('p is not a stochastic matrix')

and terminates. the empty output for a will stay.

if p is left-stochastic (then it will be regular stochastic), we will proceed with following:

**first, find the unique steady-state vector q, which is the probability vector that forms a

basis for the null space of the matrix p-eye (n): employ a matlab command null(,'r')

to find a basis for the null space and, then, scale the vector in the basis to get the required

probability vector a.

**next, verify that the markov chain converges to q by calculating consecutive iterations:

x =p*x0, x =p*x, x, =p*x,.

you can use a "while" loop here. your loop has to terminate when, for the first time, the

output of the function closetozeroroundoff () with p=7, run on the vector of the difference

between a consecutive iteration and q, is the zero vector. count the number of iterations k that

is required to archive this accuracy and display k in your code with the corresponding

message.

this is the end of your function markov.

we

Answers

The function q-markov(p,x0) checks if the given matrix p is left-stochastic and finds the unique steady-state vector q. It then verifies that the Markov chain converges to q and outputs the number of iterations required to achieve convergence.

The task at hand is to create a function in MATLAB that checks whether a given matrix p is stochastic or not. If the matrix is not left-stochastic, the program will display an error message and terminate. However, if the matrix is left-stochastic, the function will proceed with finding the unique steady-state vector q using the null space of the matrix p-eye(n) and scaling the resulting basis vector.

After obtaining the steady-state vector, the function will verify that the Markov chain converges to q by calculating consecutive iterations using a while loop. The loop will terminate when the output of the function closetozeroroundoff() on the difference between consecutive iterations and q is the zero vector for the first time. The number of iterations required to achieve this accuracy will be counted and displayed in the code with a corresponding message.

You can learn more about vectors at: brainly.com/question/31265178

#SPJ11

Write a program that user should type a number between 1 and 50, tripled it and print out to the screen.

Answers

Answer:

Here's an example Java program that asks the user for a number between 1 and 50, triples it, and prints the result to the screen:

import java.util.Scanner;

public class TripleNumber {

   public static void main(String[] args) {

       Scanner input = new Scanner(System.in);

       // Ask the user for a number between 1 and 50

       System.out.print("Enter a number between 1 and 50: ");

       int number = input.nextInt();

       // Check if the number is valid, then triple it and print the result

       if (number >= 1 && number <= 50) {

           int tripled = number * 3;

           System.out.printf("%d tripled is %d\n", number, tripled);

       } else {

           System.out.println("Invalid number entered.");

       }

   }

}

In this program, we first create a new Scanner object to read input from the console. We then prompt the user to enter a number between 1 and 50 using the nextInt() method of the Scanner object.

We then use an if statement to check if the number entered is valid. If the number is between 1 and 50 (inclusive), we triple it using the * operator and store the result in a variable called tripled. We then use the printf() method to display the original number and the tripled value in the format "x tripled is y", where x is the original number and y is the tripled value.

If the number entered is not valid (i.e. less than 1 or greater than 50), we display an error message using the println() method.

To write a program that prompts the user to input a number between 1 and 50, triples it, and prints the result, you can use a programming language like Python.

Here's a simple implementation:

```python
# Get user input
num = int(input("Enter a number between 1 and 50: "))

# Check if the number is in the valid range
if 1 <= num <= 50:
   # Triple the number
   tripled_num = num * 3

   # Print the result
   print("The tripled number is:", tripled_num)
else:
   print("Invalid input. Please enter a number between 1 and 50.")
```

This program starts by getting user input with the `input()` function, and converts the input to an integer using `int()`. It then checks if the number is within the specified range (1 to 50) using a conditional `if` statement.

As a result, If the number is valid, it calculates the tripled value by multiplying the number by 3 and prints the result using the `print()` function. If the number is not within the valid range, the program prints an error message prompting the user to enter a valid number.

You can learn more about Python at: brainly.com/question/30427047

#SPJ11

Which feature provides the capability of setting a form field at a desired location in a form and restricting its movement

Answers

The feature that provides the capability of setting a form field at a desired location in a form and restricting its movement is called "anchoring" in Microsoft Word.

Anchoring is a powerful feature that enables you to control the position of a form field relative to the surrounding text in a document. When you anchor a form field to a specific location in a document, it stays in that position even if you add or remove the text before or after it. This ensures that the form field remains in the correct location and retains its intended functionality.

To anchor a form field in Microsoft Word, you can use the "Properties" dialog box. In the "Position" tab of the dialog box, you can choose to anchor the field to a specific paragraph or to the page itself. You can also choose to specify additional options, such as whether the field should be locked and whether it should be hidden or displayed.

To learn more about Microsoft Word, visit:

https://brainly.com/question/24749457

#SPJ11

in the optimistic approach, during the phase, changes are permanently applied to the database. question 26 options: a) write b) read c) validation d) shared

Answers

In the optimistic approach, during the validation phase, changes are permanently applied to the database. Option c is answer.

The optimistic approach is a concurrency control technique used in database systems. It allows multiple transactions to execute concurrently with the assumption that conflicts between transactions are rare. In this approach, during the validation phase, the database checks if the changes made by a transaction conflict with any other concurrent transactions. If there are no conflicts, the changes are permanently applied to the database.

Option C (validation) is the correct answer. The validation phase is a crucial step in the optimistic approach, where the system ensures that the changes made by a transaction do not violate any integrity constraints or conflict with other concurrent transactions. Once the validation is successful, the changes can be committed to the database permanently.

Option c is answer.

You can learn more about optimistic approach at

https://brainly.com/question/29891154

#SPJ11

Please helpp will mark brainlest!!

drag each tile to the correct box.

alex leads a team of eight members. arrange his take in sequential order of phases of group dynamics. what are stages in group dynamics that alex should follow?

Answers

orming: In this stage, the group comes together, and members get to know each other. They start defining their roles, goals, and objectives. Alex should establish clear goals and objectives for the team and ensure that every team member is aware of their roles and responsibilities.

Storming: In this stage, conflicts may arise as team members start to express their opinions and ideas. Alex should encourage open communication and resolve conflicts quickly to maintain a positive team environment.

Norming: In this stage, the team establishes norms and values that guide their behavior. Alex should facilitate team-building activities and establish a set of rules that everyone agrees to follow.

Performing: In this stage, the team is fully functional, and members work together to achieve the common goal. Alex should recognize and reward the team's accomplishments and maintain their motivation to continue performing at a high level.

Adjourning: In this stage, the team is disbanded, and members move on to other projects or roles. Alex should ensure that the team has closure, celebrate their successes, and provide feedback to help them improve their performance in future projects.

1. Write a JavaScript statement or a set of statements to accomplish each of the following tasks: a) Sum the odd integers between 1 and 99. Use a for structure. Assume that the variables sum and count have been declared. B) Calculate the value of 2. 5 raised to the power of 3. Use the pow method. C) Print the integers from 1 to 20 by using a while loop and the counter variable x. Assume that the variable x has been declared, but not initialized. Print only five integers per line. D) Repeat Exercise (c), but using a for statement. G

Answers

a) The JavaScript code sums the odd integers between 1 and 99 using a for loop and outputs the result. b) The JavaScript code calculates and outputs the value of 2.5 raised to the power of 3 using the Math.pow method. c) The JavaScript code outputs the integers from 1 to 20 by using a while loop and the counter variable x, printing only five integers per line. d) The JavaScript code outputs the integers from 1 to 20 by using a for loop, printing only five integers per line and using an if statement to print a new line after every fifth integer.

a)

```javascript
var sum = 0;
var count = 0;
for (var i = 1; i <= 99; i += 2) {
 sum += i;
 count++;
}
console.log("Sum of odd integers between 1 and 99: " + sum);
```

This will output the sum of odd integers between 1 and 99.


b)

```javascript
var result = Math.pow(2.5, 3);
console.log("Result of 2.5 raised to the power of 3: " + result);
```

This will output the result of 2.5 raised to the power of 3, which is 15.625.

c)

```javascript
var x = 1;
var counter = 0;
while (x <= 20) {
 console.log(x);
 x++;
 counter++;
 if (counter === 5) {
   console.log("");
   counter = 0;
 }
}
```

This will output the integers from 1 to 20 by using a while loop and the counter variable x, printing only five integers per line.


d)

```javascript
var counter = 0;
for (var x = 1; x <= 20; x++) {
 console.log(x);
 counter++;
 if (counter === 5) {
   console.log("");
   counter = 0;
 }
}
```

This will output the integers from 1 to 20 by using a for loop, printing only five integers per line. The if statement is used to print a new line after every fifth integer.

Know more about the loop click here:

https://brainly.com/question/30494342

#SPJ11

The frequency of the analog signal in illustration A is _ Hz

Answers

The frequency of the analog signal in illustration A is 7 Hz

What is Frequency?

The frequency of a repeated event is the number of occurrences per unit of time. It is separate from angular frequency and is sometimes referred to as temporal frequency. The unit of frequency is hertz, which equals one occurrence every second.

Frequency is a measurement of how frequently a recurrent event, such as a wave, happens in a certain period of time. A cycle is one completion of the repeating pattern. Only moving waves that change position with respect to time have frequency.

Learn more about frequency  at:

https://brainly.com/question/5102661

#SPJ1

Assume we have a 1D print pattern with a resolution (i. E. , spatial sampling frequency) of 120 dots per cm, which equals approximately 300 dots per inch (dpi) and a total signal length of N= 1800 samples. Calculate the i. Sampling interval [2] ii. Physical signal length [1] iii. The fundamental frequency of this signal (again implicitly assumed to be periodic)

Answers

The calculated values are: i. The sampling interval for the given 1D print pattern is 0.008333 cm. ii. The physical signal length is 15 cm. iii. The fundamental frequency of this signal is 0.0667 Hz.

i. Sampling interval: To calculate the sampling interval, you can use the formula:
Sampling interval = 1 / (Resolution in dots per cm)
In this case, the resolution is 120 dots per cm, so the sampling interval is:
Sampling interval = 1 / 120 = 0.008333 cm

ii. Physical signal length: To find the physical signal length, use the formula:
Physical signal length = Total number of samples / Resolution in dots per cm
With a total signal length of N = 1800 samples and a resolution of 120 dots per cm, the physical signal length is:
Physical signal length = 1800 / 120 = 15 cm

iii. Fundamental frequency: The fundamental frequency can be calculated using the formula:
Fundamental frequency = 1 / Physical signal length
Now that we have the physical signal length, we can calculate the fundamental frequency:
Fundamental frequency = 1 / 15 = 0.0667 Hz

i. The sampling interval for the given 1D print pattern is 0.008333 cm.
ii. The physical signal length is 15 cm.
iii. The fundamental frequency of this signal is 0.0667 Hz.

To know more about frequency visit:

https://brainly.com/question/14680642

#SPJ11

3. 14 lab Detecting Network Change (files and lists) IN PYTHON PLEASE!!


Securing a network from attacks means a network administrator is watching traffic and user activity. Change detection (CD) is a method used to track changes in your network. CD can detect files accessed during off hours to more complex algorithmic detections added to software applications that manage this process.


This program is going to manage user login times and attempt to detect any change in a users typical login attempts. It will use an input file to store data and read the file using the csv. Reader( ) method. The file will contain a list of login_names, followed by login_time separated by commas.


Write a program that first reads in the name of an input file, reads the information stored in that file and determines if the user login has occurred at off hour times. The company employees work from 9 am to 5 pm so any other time would be an off hour login attempt. If the login attempt is made after hours, store the user name and login time in a dictionary with the user name as the key. Display all anomaly attempts at the end of the program. If there are no questionable login attempts display No anomaly login attempts

Answers

The Python program given below reads the input file, detects off-hour login attempts, and stores the anomalies in a dictionary:

import csv

# read the input file

filename = input("Enter the name of the input file: ")

with open(filename) as file:

   reader = csv.reader(file)

   data = list(reader)

# detect off-hour login attempts

anomalies = {}

for row in data:

   username, login_time = row

   hour = int(login_time.split(':')[0])

   if hour < 9 or hour > 17:

       anomalies[username] = login_time

# display anomalies

if anomalies:

   print("Anomaly login attempts:")

   for username, login_time in anomalies.items():

       print(f"{username} - {login_time}")

else:

   print("No anomaly login attempts")

Explanation:

The program first prompts the user to enter the name of the input file containing the login data. It then reads the data from the file using the csv.reader() method and stores it in a list. The program then iterates through the list and checks if each login attempt was made during off-hours (before 9 am or after 5 pm). If an off-hour login attempt is detected, the username and login time are stored in a dictionary with the username as the key. Finally, the program checks if there are any anomalies stored in the dictionary. If there are, it prints them out in the format username - login_time. If there are no anomalies, it prints out "No anomaly login attempts".

To know more about the dictionary click here:

https://brainly.com/question/15872044

#SPJ11

Use Goal Seek to calculate the changing value in cell B12


that will result in a set value in cell B19 of $0 (zero).

Answers

To calculate the changing value in cell B12 that will result in a set value of $0 in cell B19, you can use the Goal Seek feature in Excel. This tool allows you to find the input value that will result in a specific output value by adjusting a single cell in the worksheet.

First, enter the formula or function that relates cell B12 to cell B19. For example, if B12 contains a cost value and B19 contains a total revenue value, the formula could be "=B12*1.25-B19". This formula calculates the profit margin based on the cost and revenue values.

Next, select the "Data" tab in the Excel ribbon and click on the "What-If Analysis" button. From the drop-down menu, select "Goal Seek".

In the Goal Seek dialog box, set the "Set Cell" value to cell B19 and the "To value" to 0 (zero). Then, set the "By changing cell" value to B12. Click "OK" to run the Goal Seek analysis.

Excel will then calculate the value that needs to be entered in cell B12 to achieve the desired value of $0 in cell B19. This value will be displayed in cell B12 after the analysis is complete.

Overall, Goal Seek is a powerful tool that can save time and effort when trying to find a specific input value for a desired output value. It is particularly useful for financial analysis, forecasting, and other data-driven tasks in Excel.

To learn more about Spreadsheets, visit:

https://brainly.com/question/14194551

#SPJ11

Write in assembly language a program that determines if the number stored in R4 is odd. IF the value of R4 is odd, the program puts 1 in R0. Otherwise, it puts a 0 in R0

Answers

Assembly language code that checks if the number stored in R4 is odd or even and stores the result in R0:
LOAD R1, 1    ; load the value 1 into register R1
AND R2, R4, R1    ; perform a bitwise AND operation between R4 and R1 and store the result in R2
CMP R2, 0    ; compare the value in R2 to zero
BEQ even    ; if the result of the comparison is zero, jump to the "even" label
LOAD R0, 1    ; load the value 1 into register R0 (for odd numbers)
JMP done    ; jump to the "done" label
even: LOAD R0, 0    ; load the value 0 into register R0 (for even numbers)
done:    ; program is done



1. First, we load the value 1 into register R1. We'll use this value to perform a bitwise AND operation with R4 to check if the number is odd or even.
2. Next, we perform a bitwise AND operation between R4 and R1 and store the result in R2. This will set the least significant bit of R2 to 1 if R4 is odd, and 0 if R4 is even.
3. We then compare the value in R2 to zero using the CMP instruction. If the result of the comparison is zero, it means the least significant bit of R2 is also zero, indicating an even number. In that case, we jump to the "even" label.
4. If the result of the comparison is non-zero, it means the least significant bit of R2 is 1, indicating an odd number. In that case, we load the value 1 into register R0.
5. Finally, we jump to the "done" label to end the program. If R4 was even, the program would have loaded the value 0 into R0 before jumping to the "done" label.

Learn more about Assembly language; https://brainly.com/question/30299633

#SPJ11

(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7. 99 for up to 10


hours of connection time. Additional hours or partial hours are charged at $1. 99 each.


Write a function charges that computes the total charge for a customer based on the number of hours of


connection time used in a month. The function should also calculate the average cost per hour of the time


used (rounded to the nearest 0. 01), so use two output parameters to send back these results.


You should write a second function


round_money that takes a real number as an input argument and returns as the function value the number


rounded to two decimal places. Write a main function that takes data from an input file usage. Txt and


produces an output file charges. Txt. The data file format is as follows:


Line 1: current month and year as two integers


Other lines: customer number (a five-digit number) and number of hours used


Here is a sample data file and the corresponding output file:


Data file usage. Txt


10 2009


15362 4. 2


42768 11. 1


11111 9. 9


Output file charges. Txt


Charges for 10/2009


15362 4. 2 7. 99 1. 90


42768 11. 1 10. 18 0. 92


11111 9. 9 7. 99 0. 81

Answers

The output file contains the charges for each customer, including the flat rate and any additional charges, as well as the average cost per hour.

What does the charges function do in this problem?

To solve this problem, you need to write three functions: `charges`, `round_money`, and `main`. The `charges` function calculates the total charge for a customer and their average cost per hour, given the number of hours used. The `round_money` function rounds a number to two decimal places.

The `main` function reads the input file, calls `charges` for each customer, and writes the results to the output file. The input file contains the current month and year on the first line, followed by customer numbers and the number of hours used.

The output file contains the charges for each customer, including the flat rate and any additional charges, as well as the average cost per hour.

Learn more about Charges function

brainly.com/question/16529129

#SPJ11

Given: A company has 2 locations: Orlando and Miami The company has 2000 hosts in Orlando and 1000 in Miami ICANN assigns 192. 100. 0. 0 as the starting IP address to Orlando Give your answer in the CIDR standard form such as 123. 45. 67. 89/12 - make sure there are no leading zeroes in any of the four octets used in IPV4 format. What is the CIDR subnet starting address for Orlando

Answers

The CIDR subnet starting address for Orlando, given the information provided, would be 192.100.0.0/16. This means that the company has been assigned a Class B network address with a subnet mask of 255.255.0.0. This address range can support up to 65,534 hosts, which is more than enough for the 2000 hosts in Orlando.

CIDR notation is used to describe the size of a network and is represented by a combination of the network's IP address and the number of significant bits in the subnet mask. In this case, the first 16 bits of the subnet mask are "1", indicating that they are part of the network address. The remaining 16 bits are "0", indicating that they are available for host addresses.

Overall, this CIDR subnet starting address will allow the company to efficiently manage its network resources in Orlando and allocate IP addresses to its hosts in a structured and organized way. It will also help ensure that network traffic flows smoothly and that security and performance are optimized.

You can learn more about subnets at: brainly.com/question/31828825

#SPJ11

Given the information supplied, the CIDR subnet beginning address for Orlando would be 192.100.0.0/16.

What is the explanation for this?

This indicates the firm has a Class B network address with a subnet mask of 255.255.0.0. This address range can accommodate up to 65,534 hosts, more than adequate for Orlando's 2000 hosts.

The size of a network is described using CIDR notation, which is represented by a combination of the network's IP address and the number of significant bits in the subnet mask.

The first 16 bits of the subnet mask are "1" in this example, indicating that they are part of the network address. The remaining 16 bits are set to "0," indicating that they can be used for host addresses.

Learn more about Subnet at:

https://brainly.com/question/28256854

#SPJ4

I need help on the 6. 1. 5: Circle Pyramid 2. 0 on codehs HELP!

Answers

You can create a circle pyramid in problem 6.1.5: Circle Pyramid 2.0 on CodeHS.

Problem 6.1.5: Circle Pyramid 2.0 on CodeHS. Here's a step-by-step explanation to create a circle pyramid in this coding exercise:

1. First, understand the problem statement. You need to create a circle pyramid with each row having circles of the same size, but with a smaller size as you move upwards.

2. Initialize the necessary variables for the circle radius, number of rows, and starting position (x, y coordinates).

3. Use a loop (for example, a "for" loop) to iterate through the number of rows.

4. Within the loop for rows, create another loop to draw circles in each row. This loop should iterate based on the current row number (for example, the first row has one circle, the second row has two circles, and so on).

5. Calculate the x and y positions for each circle based on the current row number, circle radius, and any necessary padding or spacing.

6. Use the `circle()` function to draw a circle at the calculated x and y positions with the specified radius.

7. After drawing all the circles in a row, update the radius, x, and y positions for the next row.

Following these steps should help you create a circle pyramid in problem 6.1.5: Circle Pyramid 2.0 on CodeHS.

Learn more about circle pyramid visit:

https://brainly.com/question/23572624

#SPJ11

Which specific repare available for viewing
downin the ATA Report console

Answers

The specific repairs available for viewing in the ATA Report console 8s based on the specific aircraft and maintenance records being used.

What is the repair about?

The ATA Report console is a form used to access and survive maintenance records and other dossier related to distinguishing aircraft based on their ATA codes.

Depending on the particular maintenance records being secondhand and the ATA codes associated with the airplane, the ATA Report console may support access to a range of repair and perpetuation information, including analyses about specific repairs created to the aircraft, support schedules, and compliance records.

Learn more about repair from

https://brainly.com/question/29577684

#SPJ4

Question 4 of 20
most applications will ask you to provide all of the following information
except
a. the date you can start work
b. the dates and hours you are available to work.
c. your desired salary or wage.
d. which of your previous jobs you didn't like.

Answers

Most applications will ask you to provide all of the following information except (d) which of your previous jobs you didn't like. The correct option is D.

Job applications typically require information such as your availability to start work, your preferred work schedule, and your desired salary or wage, as these are relevant to the employer's needs and decision-making process. However, they do not generally ask for personal opinions or preferences about previous jobs, as this is not relevant to the current application.

When filling out job applications, focus on providing the necessary information, such as your availability and desired compensation, and avoid discussing any negative experiences with previous jobs. The correct option is D.

To know more about decision-making process visit:

https://brainly.com/question/29772020

#SPJ11

how to do average test score codehs 5.2.8

Answers

Answer:

Python

num_students = int(input("How many students do you have? "))

num_test_scores = int(input("How many test scores per student? "))

# Initialize an accumulator for test scores.

total = 0.0

# Get a student's test scores.

for student in range(num_students):

# Print the student's name.

print("Student", student + 1)

# Get the student's test scores.

for test_num in range(num_test_scores):

score = float(input("Test number", test_num + 1, end=''): '))

# Add the score to the accumulator.

total += score

# Calculate the average test score.

average = total / num_students

# Display the average.

print("The average test score is", average)

This code will ask the user for the number of students and the number of test scores per student. It will then initialize an accumulator for test scores and get a student's test scores. The code will then calculate the average test score and display it.

Explanation:

Code calculating the average test score

Python

num_students = int(input("How many students do you have? "))

num_test_scores = int(input("How many test scores per student? "))

# Initialize an accumulator for test scores.

total = 0.0

# Get a student's test scores.

for student in range(num_students):

# Print the student's name.

print("Student", student + 1)

# Get the student's test scores.

for test_num in range(num_test_scores):

score = float(input("Test number", test_num + 1, end=''): '))

# Add the score to the accumulator.

total += score

# Calculate the average test score.

average = total / num_students

# Display the average.

print("The average test score is", average)

What does this code ask for?

This code will ask the user for the number of students and the number of test scores per student. It will then initialize an accumulator for test scores and get a student's test scores. The code will then calculate the average test score and display it.

This is only one of the advantages Python has over other programming languages like C, C++, or Java. Additionally, Python uses comparatively less lines of code than other programming languages with bigger code blocks to accomplish the same operations and tasks.

Learn more about Python here:

brainly.com/question/30427047

#SPJ2

In a park near your home, the lights go on approximately 15 minutes after sunset and go off just before sunrise. It happens every day. What is the most plausible explanation for this behavior?

Answers

With regard to the sunset the behavior of lights, this can be attributed timer or photocells.

Why is this so?

Given their unmistakable pattern of illuminating around 15 minutes after dusk and extinguishing moments before dawn, it appears plausible that the park lights in your vicinity function under the control of either a timer or a photocell.

Typically used in outdoor lighting setups, these sophisticated instruments operate on pre-programmed schedules or respond to variations in ambient light intensity. In all likelihood, the device controlling these park lights enables them to switch on soon after sunset and flicker out ahead of sunrise, thereby guaranteeing optimum illumination for visitors at night while conserving precious energy reserves during daylight.

Learn more about sunset at:

https://brainly.com/question/28427012

#SPJ1

Four-year colleges typically require
admission.
years of foreign-language study for
a. o
b. 1
c. 2
d. 3

Answers

The answer is option C: 2 years of foreign-language study is typically required for admission to four-year colleges.

Most four-year colleges in the United States require two years of foreign-language study for admission.

This is because colleges want their students to be well-rounded and have exposure to different cultures and languages. Additionally, studying a foreign language can improve cognitive abilities and problem-solving skills, which are valuable in any field of study.

While some colleges may require more or less than two years of foreign-language study, it is a common requirement across many institutions. It is important for students to check the specific admission requirements for the colleges they are interested in to ensure they meet all requirements.

For more questions like Skill click the link below:

https://brainly.com/question/22072038

#SPJ11

Write a program that prints the U. S. Presidential election years from 1792 to present day, knowing that such elections occur every 4 years. Hint: Initialize your loop variable to 1792. Don't forget to use <= rather than == to help avoid an infinite loop

Answers

The steel subcontractor will furnish and install the steel angles.

In this scenario, the need for additional reinforcement in the form of steel angles arises due to the absence of rebar trim bars. The rebar subcontractor did not provide additional reinforcing because their work practice is limited to only adding trim bars around deck penetrations physically placed on the deck.

Hence, the responsibility of furnishing and installing the steel angles falls upon the steel subcontractor.

Steel angles are commonly used to reinforce concrete structures and provide additional support. They can be installed by welding or bolting them onto the existing structure. In this case, once the steel angles are installed, the deck will be core drilled for the conduits to pass through.

For more questions like Structure click the link below:

https://brainly.com/question/10730450

#SPJ11

Please help complete Excel (screenshot below) by using the steps below. Ty!
Start Excel. Download and open the file named EXP19_Excel_Ch08_HOEAssessment_RobertsFlooring.xlsx. Grader has automatically added your last name to the beginning of the filename.
You would like to use the Data Analysis ToolPak to create a histogram to visualize the data. To complete this task, first ensure the Data Analysis ToolPak is active. Next, use the histogram feature in the Data Analysis ToolPak to place a histogram in the worksheet. Use the range C3:C13 as the Input Range. Use the range F3:F10 as the Bin range. Place the output in cell F13. Be sure to check Labels, Cumulative Percentage, and Chart Output. Position the Chart Output so that the upper left corner starts just inside the borders of cell F23.
You would like to add a linear trendline to a scatter plot to help better forecast pricing based on square footage of the installation space. You will position the chart to start in cell K3, place the sqft data in the X axis, the Cost data in the Y axis, and add a trendline with equation and R-square. Be sure to add a descriptive chart title (Price Forecast).
You would like to use the FORECAST.LINEAR function to calculate a cost estimate to install 1500 sqft of flooring. Be sure to use the cost data as the known_ys and the Sqft data as the known_xs. Place the formula in cell I4.
Create a footer with your name on the left side, the sheet name code in the center, and the file name code on the right side.
Save and close EXP_Excel_CH08_HOEAssessment_RobertsFlooring.xlsx. Exit Excel. Submit the file as directed.

Answers

To complete the Excel assessment, follow the steps below:

1. Start Excel and download/open the file named EXP19_Excel_Ch08_HOEAssessment_RobertsFlooring.xlsx. Grader has automatically added your last name to the beginning of the filename.

2. Activate the Data Analysis ToolPak to create a histogram to visualize the data. Use the histogram feature in the Data Analysis ToolPak to place a histogram in the worksheet. Use the range C3:C13 as the Input Range. Use the range F3:F10 as the Bin range. Place the output in cell F13. Be sure to check Labels, Cumulative Percentage, and Chart Output. Position the Chart Output so that the upper left corner starts just inside the borders of cell F23.

3. Add a linear trendline to a scatter plot to help better forecast pricing based on square footage of the installation space. Position the chart to start in cell K3, place the sqft data in the X axis, the Cost data in the Y axis, and add a trendline with equation and R-square. Be sure to add a descriptive chart title (Price Forecast).

4. Use the FORECAST.LINEAR function to calculate a cost estimate to install 1500 sqft of flooring. Be sure to use the cost data as the known_ys and the Sqft data as the known_xs. Place the formula in cell I4.

5. Create a footer with your name on the left side, the sheet name code in the center, and the file name code on the right side.

6. Save and close EXP_Excel_CH08_HOEAssessment_RobertsFlooring.xlsx. Exit Excel. Submit the file as directed.

Learn more about assessment here:

https://brainly.com/question/28046286

#SPJ11

Let's look at the relationship between mRNA Expression (Affy) vs. MRNA Expression (RNAseq) only. Define a function called regression_parameters that returns the parameters of the regression line as a two-item array containing the slope and intercept of the regression line as the first and second elements respectively. The function regression_parameters takes in two arguments, an array of x values, and an array of y values

Answers

To define a function called regression_parameters that returns the parameters of the regression line for mRNA Expression (Affy) vs. mRNA Expression (RNAseq), we can use the Python library statsmodels to perform linear regression analysis.

The first step is to import the necessary library and data. We can use Pandas to read the data from a CSV file and create two arrays, one for the x values (mRNA Expression (RNAseq)) and one for the y values (mRNA Expression (Affy)).

Once the data is loaded, we can use statsmodels to fit a linear regression model to the data and extract the slope and intercept of the regression line. The regression line represents the equation y = mx + b, where m is the slope and b is the intercept.

To define the function, we can use the following code:

import pandas as pd
import statsmodels.api as sm

def regression_parameters(x_values, y_values):

   # Create a Pandas DataFrame with the x and y values
   df = pd.DataFrame({'x': x_values, 'y': y_values})

   # Add a constant column to the DataFrame to represent the intercept    df = sm.add_constant(df)
   # Fit a linear regression model to the data
   model = sm.OLS(df['y'], df[['const', 'x']]).fit()

   # Extract the slope and intercept from the model
   slope = model.params['x']
   intercept = model.params['const']

   # Return the parameters as a two-item array
   return [slope, intercept]

The function takes in two arguments, an array of x values and an array of y values. It first creates a Pandas DataFrame with the x and y values and adds a constant column to represent the intercept. It then fits a linear regression model to the data using the OLS (ordinary least squares) method and extracts the slope and intercept from the model. Finally, it returns the parameters as a two-item array containing the slope and intercept, respectively.

To learn more about Python programming, visit:

https://brainly.com/question/26497128

#SPJ11

As a marketing agent , Ericka's job is to help clients identify who their best client are

Answers

As a marketing agent, Ericka's job is to help clients identify who their best clients are by analyzing customer data and behavior to identify patterns and trends that can inform marketing strategies and campaigns.

One of the key ways that Ericka can help clients identify their best clients is by analyzing customer data, such as demographics, purchasing history, and online behavior. By looking at this data, Ericka can identify patterns and trends that can help to identify which customers are most valuable to the client and what their purchasing habits and preferences are.

Another approach that Ericka can take is to conduct market research, such as surveys or focus groups, to gather insights from customers themselves. By asking customers about their preferences, habits, and attitudes, Ericka can gain a deeper understanding of what drives customer behavior and what factors are most important to them when making purchasing decisions.

Once Ericka has identified who the client's best clients are, she can work with the client to develop marketing strategies that are targeted specifically to those customers. This might include personalized messaging, customized offers or promotions, or tailored content that speaks directly to the needs and interests of those customers.

To learn more about Marketing Strategies, visit:

https://brainly.com/question/25492268

#SPJ11

What might happen to the wire if the uneven load is never balanced

Answers

If an uneven load on a wire is never balanced, it can lead to a variety of potential problems and risks. One of the most common consequences of uneven loading is the buildup of stress and tension in the wire, which can cause it to become overstretched and potentially snap or break.

When a wire is subjected to uneven loading, such as when a heavier weight is placed on one side of the wire than the other, the tension in the wire becomes unbalanced. This can cause the wire to become stretched beyond its normal limits, which can lead to deformation, fatigue, and ultimately failure. If the wire is not balanced, it may also be more susceptible to external factors such as wind, vibration, and temperature changes, which can exacerbate the stress and strain on the wire.

In addition to the risk of wire failure, uneven loading can also lead to other safety hazards. For example, if the wire is used to support a structure or equipment, an imbalance in the load can cause the structure to become unstable or the equipment to malfunction. This can result in property damage, injuries, and even loss of life.

To prevent these types of issues, it is important to ensure that loads are evenly distributed on wires and other support structures. This can be achieved through the use of proper rigging techniques, such as the use of equalizer bars or spreader bars, and by carefully monitoring loads to ensure that they are balanced at all times. By taking these precautions, the risk of wire failure and other safety hazards can be minimized.

To learn more about Wire loading, visit:

https://brainly.com/question/25922783

#SPJ11

Other Questions
Lia deposits $100 into a savings account that earns simple interest at a rateof 5%. If she makes no withdrawals, how much interest has Lia's savings account earned after 5 years?A. 45B. 25C. 75D. 15Please explain. Ill give brainly How does Banneker characterize Jefferson in paragraph 3? To assist the sales staff, create a macro on the Pending Orders Status sheet for each of the four salespersons (Markia,Akima, Steve and Juan) that does the following: Filters the list for their name in the Salesperson column Filter to shows Yes in the All Items in Stock column Sorts the results by County in descending order Annan Cob binal SECTION C WRITING COMPOSITION Your composition should be about 150 words long 27th Write a piece for publication in your school magazine about some th are going on in the school that you do not like. SECTION D READING AND COMPREHENSION Read the passage below carefully and answer the questions that follo berin an aerobic exercise, your body needs to war Patricia bought 4 apples and 9 bananas for $12. 70 Jose bought 8 apples and I bananas for $17. 70 at the same grocery store What is the cost of one apple? N2(g)+3H2(g)->2NH3(g), H=-92.40kJ 1. How many grams of H2 are needed to involve 150.9kJ of heat? 2. How many moles of NH3 were produced in the process? Angle is in standard position and (5,6)(5,6) is a point on the terminal side of . If 0 jan and jill started a business 20 years ago. jill recently stepped down and her daughter jenny has agreed to start managing the company with jan's help. the eventual goal is for jenny to run the entire company. this process between jan and jenny is called PLEASE HELP A survey was done that asked people to indicate whether they prefer saltwater fishing or freshwater fish in the results of the survey are shown in the two way table complete a relative frequency table from this data. enter your answer is rounded to the nearest 10th of a percent in the boxes the radius of the area of a cylinder is 36m and its height is 46m. find the surface area of the cylinder in terms of technician a says to inspect a suspicious exhaust system when it is warm. technician b says that dampeners are used with many exhaust systems to reduce vibration. which technician is correct? Calculate the intensity transmission coefficient TI and reflection coefficient RI for the following interfaces: muscle/kidney, air/ muscle, bone/ muscle. assuming that the ultrasound incidence beam makes angle of 30 degree What is question asking??? All I need is one example and I get the rest I just dont understand the assignment gabriela is building wooden box that is 15 in. tall and has a rectangular base that is 18 in by 15 in 15Find the first and second derivatives. y = - 5x4+1 dy dx ||| dx2 The sponsor has the ultimate responsibility for implementing and maintaining Quality Assurance systems 1. pare crispin went to mang cesar to ask for some rice, but he said he have no more rice to give. what do you think will happen to the families of other farmers with no rice like pare crispin? In a poll of students at the football championship, 90% of the students say that football is better than basketball. Explain why it is not a valid conclusion to say that football is more popular than basketball at school. Suggest a better method of determining which sport is more popular. Explain how to find the measure of angles a and b has a measure of 36 degrees How many triangles can be desert with the side lengths 4 centimeters, 4. 5 centimeters and 9 centimeters