My code doesn't give me the right output: I have to use the Python input command, and the number could be a decimal fraction, such as 6.5, so I should use floating point numbers?
I need to have a loop that repeats six times, with a routine in the middle of the loop to get the user input as a floating point number and add the number to a sum.

Can someone check it for me?
score_list = [ input("Judge No {} :score ".format(num+1)) for num in range(6)]
int_accumilator :int = 0
for score in score_list:
if(score > 10 ):
print("i only like numbers within the 0-10 range !")
exit()
int_accumilator+= score

print("the average score is ...", int_accumilator/ len(score_list))

My Code Doesn't Give Me The Right Output: I Have To Use The Python Input Command, And The Number Could

Answers

Answer 1

Answer:

def get_score(judge_num: int) -> float:

   """

   Asks the user for the score of a single judge and returns it.

   """

   score = float(input(f"Score for Judge {judge_num}: "))

   return score

def calculate_average(scores: list[float]) -> float:

   """

   Calculates the average score given a list of scores.

   """

   return sum(scores) / len(scores)

# Initialize the total score to 0

total_score = 0

# Initialize an empty list to store the scores of the judges

scores = []

# Loop through each judge

for judge_num in range(1, 7):

   # Get the score for the current judge

   score = get_score(judge_num)

   # Add the score to the total score

   total_score += score

   # Append the score to the list of scores

   scores.append(score)

# Calculate the average score

average_score = calculate_average(scores)

# Print the average score

print(f"The average score is: {average_score:.2f}")

Answer 2
There are a few issues with your code.

First, the input function returns a string, not a number. You need to convert the input to a number using the float function before adding it to the int_accumulator.

Second, you have defined int_accumulator as an int, but you are trying to add floating point numbers to it. This will cause an error. Instead, you should define int_accumulator as a float to allow it to hold decimal values.

Finally, you have a typo in your code - int_accumilator should be int_accumulator.

Here is the corrected code:

score_list = [float(input("Judge No {} :score ".format(num+1))) for num in range(6)]
int_accumulator: float = 0
for score in score_list:
if score > 10:
print("I only like numbers within the 0-10 range !")
exit()
int_accumulator += score

print("the average score is ...", int_accumulator / len(score_list))

This should allow you to get the correct output.

Related Questions

use router,switches and Hubs to design a simple network for maendeleo institute of Technology having 240 employees.The institute have five department: computer science has 100 employees ,information technology 60 employees ,Account 40 employees ,Human resource has 20 employees and marketing has 20 employees . Require: .network topology showing five network that corresponding to five department .use class C IP addresses (example 192.168.10.0/24) to show subnet ID and broadcast ID of each department , the IP address must not overlap .consider scalability .Give reason for your choice /decision​

Answers

Answer:

To design a simple network for Maendeleo Institute of Technology with 240 employees, we could use a combination of routers, switches, and hubs.

Our network would consist of five separate networks, one for each department at the institute. We would use class C IP addresses, with a subnet mask of /24, to create the following subnets:

Computer Science department: 192.168.10.0/24

Information Technology department: 192.168.11.0/24

Account department: 192.168.12.0/24

Human Resource department: 192.168.13.0/24

Marketing department: 192.168.14.0/24

Each department would be connected to the network via a switch, which would allow for communication within the department and with other departments as needed. A router would be used to connect the individual department networks to the wider internet, and would also serve as a firewall to protect the network from external threats.

We would also include a hub in the network to allow for communication between devices within a department, as well as to provide additional connectivity and scalability.

Overall, our network design would provide each department with its own separate network, with the ability to communicate with other departments as needed. It would also be scalable, allowing for the addition of new devices and departments as the institute grows. The use of class C IP addresses and a /24 subnet mask would ensure that IP addresses do not overlap, ensuring efficient and reliable communication within the network.

The most reliable way to store important files without having to worry about backups or media failure is ____________.

A) cloud storage
B) on a USB flash drive
C) on a hard disk drive
D) on an optical disc

Answers

The answer to this question is letter B
A. Cloud storage


The ideal approach to save data for a longer time is cloud storage. Data security and storage reliability are two advantages of cloud storage that can't be matched. In addition, end-to-end encryption ensures the safety of all transmitted data.

Write a Java program for user defined exception that checks the internal and external marks; if the internal marks is greater than 30 it raises the exception “Internal mark exceeded”; if the external marks is greater than 70 it raises the exception and displays the message “External mark exceeded”, Create the above exception and test the exceptions.

Answers

Answer:

class MarksException extends Exception {

   public MarksException(String message) {

       super(message);

   }

}

public class Main {

   public static void main(String[] args) {

       try {

           checkMarks(35, 80);

       } catch (MarksException e) {

           System.out.println(e.getMessage());

       }

   }

   public static void checkMarks(int internal, int external) throws MarksException {

       if (internal > 30) {

           throw new MarksException("Internal mark exceeded");

       }

       if (external > 70) {

           throw new MarksException("External mark exceeded");

       }

   }

}

Explanation:

Create a program that will do the following:


Until the user types “q” to quit:


Prompt the user for a name


Prompt the user for a product name


Prompt the user for a product price (this can include decimals)


Prompt the user for a quantity of the product purchased


Have the program calculate the total (price * quantity)


Write the values to a comma separated file (Customer Name, Product Name, Price, Quantity, Total)
Could you use
Module Module1

Sub Main()

Answers

Answer:

I know it

Explanation:

I will tell later

Try it
Drag and drop each example under the appropriate heading.
taking breaks
reading in a crowded room
having resources nearby
cramming at the last minute
getting plenty of rest
starting your homework late at night
Intro
Good Study Habits
Bad Study Habits
Done

Answers

Bad habits include reading in a crowded room, starting your schoolwork late at night, and cramming right before the exam. Good habits include taking breaks, having resources close by, and getting lots of rest.

What are some poor study habits?

Being uncoordinated. Being disorganized will simply make studying much more difficult because there are so many things to do and think about. Don't merely jot down notes and post reminders in random locations.

Why do I lose track of what I learn?

If a student stays up all night studying for the test, they usually forget the material during it. The ability of the brain to retain information increases with regular study schedules and thoughtful revision, and the material is ingrained much more deeply.

To know more about Study Habits visit:-

https://brainly.com/question/28393347

#SPJ1

Which option best describes open source software?

a type of software used to bundle products together
a type of software used to sync up to Windows
a type of software that works well with almost all applications and drivers
a type of software that can be freely used and modified

Answers

Answer:

a type of software that can be freely used and modified.

The user is able to input grades and their weights, and calculates the overall final mark. The program should also output what you need to achieve on a specific assessment to achieve a desired overall mark. The program should be able to account for multiple courses as well.

I have done some pseudocode. So to double check, please provide pseudocode and python code.
I do plan to use homework, quizzes and tests for the grades portion and using the exam as part of the desired mark portion.

Answers

Answer:

Here is some pseudocode that outlines the steps for creating a program that calculates overall final marks and outputs the necessary grades for a desired overall mark:

DEFINE a function called "calculate_final_mark"

INPUT: grades (list), weights (list), desired_mark (float)

CREATE a variable called "overall_mark" and set it to 0

FOR each grade and weight in the grades and weights lists:

 MULTIPLY the grade by the weight

 ADD the result to the overall_mark

IF overall_mark equals the desired_mark:

 OUTPUT "You have already achieved the desired mark."

ELSE:

 CREATE a variable called "needed_mark" and set it equal to the desired_mark minus the overall_mark

 OUTPUT "You need a" needed_mark "on your next assessment to achieve a" desired_mark "overall mark."

END the function

Here is the equivalent code in Python:

def calculate_final_mark(grades, weights, desired_mark):

 overall_mark = 0

 for grade, weight in zip(grades, weights):

   overall_mark += grade * weight

 if overall_mark == desired_mark:

   print("You have already achieved the desired mark.")

 else:

   needed_mark = desired_mark - overall_mark

   print(f"You need a {needed_mark} on your next assessment to achieve a {desired_mark} overall mark.")

Code to be written in python:
Correct code will automatically be awarded the brainliest

You had learnt how to create the Pascal Triangle using recursion.

def pascal(row, col):
if col == 1 or col == row:
return 1
else:
return pascal(row - 1, col) + pascal(row - 1, col - 1)

But there is a limitation on the number of recursive calls. The reason is that the running time for recursive Pascal Triangle is exponential. If the input is huge, your computer won't be able to handle. But we know values in previous rows and columns can be cached and reused. Now with the knowledge of Dynamic Programming, write a function faster_pascal(row, col). The function should take in an integer row and an integer col, and return the value in (row, col).
Note: row and col starts from 1.

Test Cases:
faster_pascal(3, 2) 2
faster_pascal(4, 3) 3
faster_pascal(100, 45) 27651812046361280818524266832
faster_pascal(500, 3) 124251
faster_pascal(1, 1) 1

Answers

Answer:

def faster_pascal(row, col):

   # Create a list of lists to store the values

   table = [[0 for x in range(col + 1)] for x in range(row + 1)]

 

   # Initialize the first row

   table[1][1] = 1

 

   # Populate the table

   for i in range(2, row + 1):

       for j in range(1, min(i, col) + 1):

           # The first and last values in each row are 1

           if j == 1 or j == i:

               table[i][j] = 1

           # Other values are the sum of values just above and left of the current cell

           else:

               table[i][j] = table[i-1][j-1] + table[i-1][j]

 

   # Return the required result

   return table[row][col]

print(faster_pascal(3, 2))

print(faster_pascal(4, 3))

print(faster_pascal(100, 45))

print(faster_pascal(500, 3))

print(faster_pascal(1, 1))

Brainliest if this helps! :))

The user is able to input grades and their weights, and calculates the overall final mark. The program should also output what you need to achieve on a specific assessment to achieve a desired overall mark. The program should be able to account for MULTIPLE COURSES as well.
I have done some pseudocode. So to double check, please provide pseudocode and python code.
I do plan to use homework, quizzes and tests for the grades portion and using the exam as part of the desired mark portion.

Please follow the instructions above. LISTS are allowed to be used.

Answers

Answer:

def calculate_final_mark(courses):

   final_mark = 0

   total_weight = 0

   for course in courses:

       final_mark += course['mark'] * course['weight']

       total_weight += course['weight']

   return final_mark / total_weight

def calculate_required_mark(courses, desired_mark):

   current_mark = calculate_final_mark(courses)

   total_weight = 0

   for course in courses:

       total_weight += course['weight']

   required_mark = (desired_mark - current_mark) / (1 - total_weight)

   return required_mark

# Example usage:

courses = [

   {'name': 'Math', 'mark': 80, 'weight': 0.4},

   {'name': 'Science', 'mark': 70, 'weight': 0.3},

   {'name': 'English', 'mark': 65, 'weight': 0.3},

]

final_mark = calculate_final_mark(courses)

print(f"Your final mark is {final_mark:.1f}")

desired_mark = 80

required_mark = calculate_required_mark(courses, desired_mark)

print(f"You need to score at least {required_mark:.1f} on your next assessment to achieve a final mark of {desired_mark}")

Create a program for the given problems using one-dimensional array. Program to identify the highest value in the given numbers.​

Answers

Answer:

Explanation:

Here's one way you could write a C program to identify the highest value in a given set of numbers using a one-dimensional array:

Copy code

#include <stdio.h>

int main() {

   int nums[10]; // Declare an array of 10 integers

   int i, max;

   printf("Enter 10 numbers: ");

   for (i = 0; i < 10; i++) {

       scanf("%d", &nums[i]); // Read in the numbers

   }

   max = nums[0]; // Initialize max to the first number in the array

   for (i = 1; i < 10; i++) {

       if (nums[i] > max) { // Compare each number to the current max

           max = nums[i];  // If a number is larger, update the max

       }

   }

   printf("The highest value is: %d", max);

   return 0;

}

Hi, I have a CodeHS Python assignment called "Exclamation Points"


the assignment is as follows and I have no idea where to start with this if someone could help me please:


"Words are way more edgy when you replace the letter i with an exclamation point!


Write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point. Your function should:


Convert the initial string to a list

Use a for loop to go through your list element by element

Whenever you see a lowercase i, replace it with an exclamation point in the list

Return the stringified version of the list when your for loop is finished"

Answers

Using the knowledge in computational language in python it is possible write the function exclamations that takes a string and then returns the same string with every lowercase i replaced with an exclamation point.

Writting the code;

my_string = input("Enter text: ")

my_list = list(my_string)

for item in my_list:

   if item == "i":

       print "!"

       my_list.remove("i")

   print item

(" ").join(my_list)

my_string = list(input('Enter string: '))

for i, char in enumerate(my_string):

   if char == 'i':

       my_string[i] == '!'

print(''.join(my_string))

my_string = input("Enter text: ")

my_list = list(my_string)

for item in my_list:

   if item == "i":

       print "!"

       my_list.remove("i")

   else:

       print item

(" ").join(my_list)

See more about python at  brainly.com/question/18502436

#SPJ1

Steve works in human resources for a company with more than three thousand employees. He needs to send new insurance documents to each employee. Steve should _____.

A) use a digital ink pen to scan his handwritten notes from a meeting
B) send an e-mail to all employees and attach the insurance documents
C) call each employee and ask them to pick up the documents at his desk
D) create a presentation

Answers

The correct answer is B) send an email to all employees and attach the insurance documents. This is the most efficient and effective way for Steve to disseminate the insurance documents to all employees. It allows employees to access the documents electronically, at their convenience, and ensures that everyone receives the same information. Option A) using a digital ink pen to scan handwritten notes is not a viable option for distributing the insurance documents to all employees. Option C) calling each employee and asking them to pick up the documents at Steve's desk is also not practical, as it would be time-consuming and may not be convenient for all employees. Option D) creating a presentation is not relevant to the task at hand.

Complete a program that takes a weight in kilograms as input, converts the weight to pounds, and then outputs the weight in pounds. 1 kilogram = 2.204 pounds (lbs). Ex: If the input is: 10 the output is: 22.040000000000003 lbs Note: Your program must define the function def kilo_to_pounds(kilos)

Answers

Hello there!

def kilo_to_pounds(kilos):

____pounds = 2.204 * kilos

____return pounds

kilos = int(input())

print(kilo_to_pounds(kilos), 'lbs')

The program that takes a weight in kilograms as input, converts the weight to pounds, and then outputs the weight in pounds is in the explanation part.

What is programming?

The process of carrying out a specific computation through the design and construction of an executable computer programme is known as computer programming.

Here is the completed program in Python:

def kilo_to_pounds(kilos):

   pounds = kilos * 2.204

   return pounds

# Main program

kilo_input = float(input("Enter weight in kilograms: "))

pounds_output = kilo_to_pounds(kilo_input)

print("Weight in pounds: ", pounds_output)

Thus, the kilo_to_pounds function takes a weight in kilograms as input and converts it to pounds using the conversion factor of 2.204.

For more details regarding programming, visit:

https://brainly.com/question/11023419

#SPJ2

Will mark brainliest if correct!
Code to be written in python

A deferred annuity is an annuity which delays its payouts. This means that the payouts do not start until after a certain duration. Notice that a deferred annuity is just a deposit at the start, followed by an annuity. Your task is to define a Higher-order Function that returns a function that takes in a given interest rate and outputs the amount of money that is left in a deferred annuity.

Define a function new_balance(principal, gap, payout, duration) that returns a single-parameter function which takes in a monthly interest rate and outputs the balance in a deferred annuity. gap is the duration in months before the first payment, payout is monthly and duration is just the total number of payouts.

Hint: Note that duration specifies the number of payouts after the deferment, and not the total duration of the deferred annuity.

def new_balance(principal, gap, payout, duration):
# Complete the function
return


# e.g.
# test_balance = new_balance(1000, 2, 100, 2)
# result = test_balance(0.1)

Test Case:
new_balance(1000, 2, 100, 2)(0.1) 1121.0

Answers

Answer:

def new_balance(principal, gap, payout, duration):

   def calculate_balance(interest_rate):

       balance = principal

       for i in range(gap):

           balance *= (1 + interest_rate/12)

       for i in range(duration):

           balance *= (1 + interest_rate/12)

           balance -= payout

       return balance

   return calculate_balance

Explanation:

Answer:

def new_balance(principal, gap, payout, duration):

   # convert monetary amounts to cents

   principal_cents = principal * 100

   payout_cents = payout * 100

   

   def balance(rate):

       # calculate the interest earned during the deferment period in cents

       interest_cents = principal_cents * (1 + rate) ** gap - principal_cents

       # calculate the balance after the first payout in cents

       balance_cents = interest_cents + principal_cents - payout_cents

       # loop through the remaining payouts, calculating the balance after each one in cents

       for i in range(duration - 1):

           balance_cents = balance_cents * (1 + rate) - payout_cents

       # convert the balance back to dollars and round it to the nearest cent

       balance_dollars = round(balance_cents / 100)

       return balance_dollars

   return balance

test_balance = new_balance(1000, 2, 100, 2)

result = test_balance(0.1)

print(float(result))

Code to be written in Python
Correct answer will be awarded Brainliest

In this task, we will be finding a possible solution to number puzzles like 'SAVE' + 'MORE' = 'MONEY'. Each alphabet represents a digit. You are required to implement a function addition_puzzle that returns a dictionary containing alphabet-digit mappings that satisfy the equation. Note that if there are multiple solutions, you can return any valid solution. If there is no solution, then your function should return False.


>>> addition_puzzle('ANT', 'MAN', 'COOL')
{'A': 8, 'C': 1, 'L': 9, 'M': 6, 'N': 7, 'O': 5, 'T': 2}

>>> addition_puzzle('AB', 'CD', 'E')
False
Explanations:

ANT + MAN = COOL: 872 + 687 = 1559
AB + CD = E: The sum of two 2-digit numbers must be at least a two-digit number.

Your solution needs to satisfy 2 conditions:

The leftmost letter cannot be zero in any word.
There must be a one-to-one mapping between letters and digits. In other words, if you choose the digit 6 for the letter M, then all of the M's in the puzzle must be 6 and no other letter can be a 6.
addition_puzzle takes in at least 3 arguments. The last argument is the sum of all the previous arguments.

Note: The test cases are small enough, don't worry too much about whether or not your code will run within the time limit.

def addition_puzzle(*args):
pass # your code here

Answers

Answer:

Here is one possible solution to this problem in Python:

from itertools import permutations

def addition_puzzle(*args):

 # Get all permutations of the digits 0-9

 digits = list(range(10))

 all_permutations = list(permutations(digits))

 # Iterate through each permutation

 for perm in all_permutations:

   # Create a dictionary mapping each alphabet to a digit

   mapping = {alphabet: digit for alphabet, digit in zip(args[0], perm)}

   if all(mapping[alphabet] != 0 for alphabet in args[0]):

     # Check if the sum of the numbers is equal to the last argument

     num1 = int(''.join(str(mapping[alphabet]) for alphabet in args[1]))

     num2 = int(''.join(str(mapping[alphabet]) for alphabet in args[2]))

     if num1 + num2 == int(''.join(str(mapping[alphabet]) for alphabet in args[3])):

       return mapping

 # If no solution is found, return False

 return False

print(addition_puzzle('ANT', 'MAN', 'COOL'))

print(addition_puzzle('AB', 'CD', 'E'))

Explanation:

This solution first generates all possible permutations of the digits 0-9 using the permutations function from the itertools module. Then, it iterates through each permutation and creates a dictionary mapping each alphabet to a digit. It checks if the leftmost letter in any word is not zero and if the sum of the numbers is equal to the last argument. If both conditions are satisfied, it returns the mapping. If no solution is found after iterating through all permutations, it returns False.

Write a procedure ConvertToBinary that takes an input as a number from 0 to 16 (including 0 but not 16) and converts it to a binary number. The binary number should be returned as a list.

Answers

Sure, here's an example of a Python function that converts a decimal number to binary and returns the result as a list:

def ConvertToBinary(decimal):

binary = []

while decimal > 0:

remainder = decimal % 2

binary.append(remainder)

decimal = decimal // 2

return binary[::-1]

The function takes in an input decimal which is a number between 0 and 16 (not including 16) and uses a while loop to repeatedly divide the decimal number by 2 and take the remainder. The remainders are then appended to a list binary. Since the remainders are appended to the list in reverse order, the result is reversed by slicing the list [-1::-1] to give the proper order.

You can also add a check to make sure that the input is within the required range:

def ConvertToBinary(decimal):

if decimal < 0 or decimal >= 16:

return None

binary = []

while decimal > 0:

remainder = decimal % 2

binary.append(remainder)

decimal = decimal // 2

return binary[::-1]

this way you can make sure that the input provided is within the allowed range.

python best hashing algorithm for passwords with mysql

Answers

Answer: So you Wait a minute I do believe that mysql is a sql cracking suit but you would need to build a hashing suit or you could use passlib.hash.mysql41 so you are looking to crack some stuff ok look at the file I sent.

Explanation:

Which of the following does NOT pair the statement with the corresponding output?

Answers

The statement that does not pair with the corresponding output is system.out.printin (a + b+ c). The correct option is statement A.

What is the output?

Output is any information processed by and sent by a computer or other electronic device. Anything visible on your computer monitor screen, such as the words you write on your keyboard, is an example of output.

Outputs can be text displayed on the computer's monitor, sound from the computer's speakers, or a physical output such as a printed sheet of paper from a printer connected to the computer.

Therefore, the correct option is A, system.out.printin (a + b+ c).

To learn more about output, refer to the link:

https://brainly.com/question/13736104

#SPJ1

if there is an apple logo on my computer what operating system does it run on

Answers

Answer:Mac OS if there is a apple logo

Mac OS to run off of the apple logo

Accenture is one of several hundred companies that has signed on to the United Nations Global Compact (UNGC) Business Ambition pledge.

Answers

Answer: True

Explanation:
Accenture is one of several hundred companies that has signed on to the United Nations Global Compact (UNGC) Business Ambition pledge. The UNGC is a voluntary initiative that encourages businesses to align their operations and strategies with ten universally accepted principles in the areas of human rights, labor, environment, and anti-corruption. The Business Ambition pledge is a component of the UNGC that invites businesses to set ambitious, science-based targets to reduce greenhouse gas emissions in line with the goals of the Paris Agreement. Accenture is one of many companies that have committed to this pledge and to taking action to combat climate change and support sustainable development.

An automotive company tests the driving capabilities of its self driving car prototype. They Carry out the test on various types of roadways specifically a racetrack chill rack and dirt road what are the examples of fair or unfair practices

Answers

It is to be noted that testing a self-driving car prototype on various types of roadways, such as a racetrack, hill rack, and dirt road, can be considered fair practice. It would only be unfair practice if the lives and property of humans are put at risk during the testing.

What is unfair practice?

Unfair practices are behaviors that are neither just or fair. It would be deemed unjust to treat someone differently because of their color or gender, for example. Cheating or violating regulations to get an edge over others is also included. To develop a fair and just society, it is critical to constantly treat people with fairness and respect.

In this scenario, it is evident that endangering human life and property is unethical behavior.

Learn more about Unfair Practices:
https://brainly.com/question/14700715
#SPJ1

Describe what social engineering is and explain its existence and prevalence.
Explain why SE is an important part of an information technology security course.
Perform statistical research in the social engineering area providing the following: (1) Describe the current percentage of cyber attacks relying on social engineering and the percentage of attacks from both internal and externa sources; and (2) Describe how these percentages impact the current corporate social engineering incident response effort.
Discuss employee and management responsibilities with regard to information security and combating SE. Make sure your work clarifies your opinion as to who carries more responsibility for preventing SE-the employees or management. Provide examples to back up your statements.

Answers

Social engineering is a tactic used by attackers to manipulate individuals into divulging sensitive information or performing actions that may be harmful to the organization.

Social engineering attacks exploit human psychology, emotions, and trust to trick people into revealing sensitive information or performing actions that they otherwise wouldn't. The attacks can take many forms, such as phishing emails, phone scams, pretexting, and baiting.

What is social engineering?

The prevalence of social engineering attacks has increased in recent years, as attackers have become more sophisticated and creative in their methods.

According to the Verizon Data Breach Investigations Report (DBIR) in 2020, social engineering is used in 84% of successful cyber attacks and the most common form of social engineering is phishing. It is also reported that around 30% of phishing messages are opened and 12% of recipients click on the malicious link.

When it comes to combating social engineering, both employees and management carry some level of responsibility. Employees are the first line of defense and play a vital role in protecting the organization's sensitive information. They should be educated and trained on how to identify and avoid social engineering attacks. Management, on the other hand, is

Learn more about social engineering  from

https://brainly.com/question/29024098

#SPJ1

Use routers, Switches and Hubs to design a simple network for Maendeleo Institute of Technology having 240 employees. The Institute has five departments: Computer Science has 100 employees, Information Technology 60 employees, Accounts 40 employees, Human Resource has 20 employees and Marketing has 20 employees.

Required:

• Network topology showing five network that corresponds to five departments.

• Use Class C IP addresses (example 192.168.10.0/24) to show the subnet ID and broadcast ID of each department, the IP address must not overlap

• Consider Scalability

• Give reasons for your choice/ decisions

Answers

Answer:

To design a simple network for Maendeleo Institute of Technology with 240 employees, we could use a combination of routers, switches, and hubs.

Our network would consist of five separate networks, one for each department at the institute. We would use class C IP addresses, with a subnet mask of /24, to create the following subnets:

Computer Science department: 192.168.10.0/24

Information Technology department: 192.168.11.0/24

Account department: 192.168.12.0/24

Human Resource department: 192.168.13.0/24

Marketing department: 192.168.14.0/24

Each department would be connected to the network via a switch, which would allow for communication within the department and with other departments as needed. A router would be used to connect the individual department networks to the wider internet, and would also serve as a firewall to protect the network from external threats.

We would also include a hub in the network to allow for communication between devices within a department, as well as to provide additional connectivity and scalability.

Overall, our network design would provide each department with its own separate network, with the ability to communicate with other departments as needed. It would also be scalable, allowing for the addition of new devices and departments as the institute grows. The use of class C IP addresses and a /24 subnet mask would ensure that IP addresses do not overlap, ensuring efficient and reliable communication within the network.

Code to be written in python:

Correct answer will be automatically awarded the brainliest!

Since you now have a good understanding of the new situation, write a new num_of_paths function to get the number of ways out. The function should take in a map of maze that Yee Sian sent to you and return the result as an integer. The map is a tuple of n tuples, each with m values. The values inside the tuple are either 0 or 1. So maze[i][j] will tell you what's in cell (i, j) and 0 stands for a bomb in that cell.
For example, this is the maze we saw in the previous question:

((1, 1, 1, 1, 1, 1, 1, 1, 0, 1),
(1, 0, 0, 1, 1, 1, 0, 0, 1, 1),
(0, 1, 1, 1, 0, 0, 1, 1, 1, 0),
(1, 1, 0, 1, 1, 1, 1, 0, 1, 1),
(0, 1, 0, 1, 0, 0, 1, 0, 1, 0),
(1, 0, 1, 1, 1, 1, 0, 1, 1, 1),
(0, 1, 1, 1, 1, 1, 1, 1, 1, 0),
(1, 0, 1, 0, 0, 1, 1, 0, 1, 1),
(1, 0, 1, 1, 1, 0, 1, 0, 1, 0),
(1, 1, 0, 1, 0, 1, 0, 1, 1, 1))
Note: You should be using dynamic programming to pass time limitation test.

Hint: You might find the following algorithm useful:

Initialize an empty table (dictionary), get the number of rows n and number of columns m.
Fill in the first row. For j in range m:
2.1 If maze[0][j] is safe, set table[(0, j)] to be 1 because there's one way to go there.
2.2 If maze[0][j] has a bomb, set table[(0, k)] where k >= j to be 0. Since one cell is broken along the way, all following cells (in the first row) cannot be reached.
Fill in the first column. For i in range n:
3.1 If maze[i][0] is safe, set table[(i, 0)] to be 1 because there's one way to go there.
3.2 If maze[i][0] has a bomb, set table[(i, 0)] and all cells under it to be 0. The reason is same as for the first row.

Main dynamic programming procedure - fill in the rest of the table.
If maze[i][j] has a bomb, set table[(i, j)] = 0.
Otherwise, table[(i, j)] = table[(i - 1, j)] + table[(i, j - 1)]
Return table[(n - 1, m - 1)]

Incomplete code:

def num_of_paths(maze):
# your code here

# Do NOT modify
maze1 = ((1, 1, 1, 1, 1, 1, 1, 1, 0, 1),
(1, 0, 0, 1, 1, 1, 0, 0, 1, 1),
(0, 1, 1, 1, 0, 0, 1, 1, 1, 0),
(1, 1, 0, 1, 1, 1, 1, 0, 1, 1),
(0, 1, 0, 1, 0, 0, 1, 0, 1, 0),
(1, 0, 1, 1, 1, 1, 0, 1, 1, 1),
(1, 1, 0, 1, 0, 1, 0, 0, 1, 1),
(0, 1, 1, 1, 1, 1, 1, 1, 1, 0),
(1, 0, 1, 0, 0, 1, 1, 0, 1, 1),
(1, 0, 1, 1, 1, 0, 1, 0, 1, 0),
(1, 1, 0, 1, 0, 1, 0, 1, 1, 1))


maze2 = ((1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1),
(1, 1, 1, 1, 1, 1, 1, 1, 1))

maze3 = ((1, 0, 1, 1),
(1, 0, 1, 1),
(1, 0, 1, 1),
(1, 0, 1, 1),
(1, 0, 1, 0),
(1, 0, 0, 1))

Test Cases:
num_of_paths(maze1) 2
num_of_paths(maze2) 3003
num_of_paths(maze3) 0

Answers

Answer:

def num_of_paths(maze):

   # Initialize the table with zeros

   n = len(maze)

   m = len(maze[0])

   table = [[0 for j in range(m)] for i in range(n)]

   # Fill in the first row

   for j in range(m):

       if maze[0][j] == 0:

           break

       table[0][j] = 1

   # Fill in the first column

   for i in range(n):

       if maze[i][0] == 0:

           break

       table[i][0] = 1

   # Fill in the rest of the table using dynamic programming

   for i in range(1, n):

       for j in range(1, m):

           if maze[i][j] == 0:

               table[i][j] = 0

           else:

               table[i][j] = table[i - 1][j] + table[i][j - 1]

   # Return the value in the bottom right corner of the table

   return table[n - 1][m - 1]

maze1 = ((1, 1, 1, 1, 1, 1, 1, 1, 0, 1),

(1, 0, 0, 1, 1, 1, 0, 0, 1, 1),

(0, 1, 1, 1, 0, 0, 1, 1, 1, 0),

(1, 1, 0, 1, 1, 1, 1, 0, 1, 1),

(0, 1, 0, 1, 0, 0, 1, 0, 1, 0),

(1, 0, 1, 1, 1, 1, 0, 1, 1, 1),

(1, 1, 0, 1, 0, 1, 0, 0, 1, 1),

(0, 1, 1, 1, 1, 1, 1, 1, 1, 0),

(1, 0, 1, 0, 0, 1, 1, 0, 1, 1),

(1, 0, 1, 1, 1, 0, 1, 0, 1, 0),

(1, 1, 0, 1, 0, 1, 0, 1, 1, 1))

maze2 = ((1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1),

(1, 1, 1, 1, 1, 1, 1, 1, 1))

maze3 = ((1, 0, 1, 1),

(1, 0, 1, 1),

(1, 0, 1, 1),

(1, 0, 1, 1),

(1, 0, 1, 0),

(1, 0, 0, 1))

print(num_of_paths(maze1))

print(num_of_paths(maze2))

print(num_of_paths(maze3))

explain the steps to adding a password in Smart Art

Answers

Answer:

To add a password to a SmartArt graphic in Microsoft PowerPoint, follow these steps:

Open the PowerPoint presentation containing the SmartArt graphic that you want to add a password to.

Select the SmartArt graphic by clicking on it.

In the ribbon at the top of the window, click the "Format" tab.

In the "Format" tab, click the "Security" button.

In the "Security" dialog box that appears, click the "Password" tab.

In the "Password" tab, enter a password in the "Password" field.

Re-enter the password in the "Confirm password" field to confirm it.

Click the "OK" button to save the password.

Save the presentation. The SmartArt graphic will now be protected with the password that you set. You will need to enter the password to edit or modify the SmartArt graphic.

Which benefits does the cloud provide to start-up companies without acccess to large funding

Answers

Answer:Among other things, the fact that anyone can connect to such a server from their home and work on something remotely

Explanation:

What type of light comes from reflections off other objects?

Answers

Light that comes from reflections off other objects is called reflected light.

5. Which of the following is a hypothetical concept?
a. Limited Memory
b. Self-aware Al
Fill in the blanks.
1. Al processes large amount of data using algorithms.
2. The term Al was coined in the year
3. The domain of Al that makes systems improve their decision-making abilities is called
c. Reactive Machines
- Intelligent systems refer to an approach that employ computers in
J
uses neural networks to process data to gain insights and give solutions
for Falco

Answers

Involving or based on a hypothesis: conjectural; involving or based on a postulated concept or theory. speculative arguments a fictitious circumstance.

How should a hypothetical example be written?

The words or abbreviations "for instance," "for example," "i.e." or "e.g." are frequently used after a hypothetical example, albeit the latter two, as you are probably aware, will only come after a comma and won't initiate a new sentence like "for instance" or "for example." Use hypothetical examples with caution.

What is a fictitious person?

The human whose existence is implied by other data rather than directly attested. theoretical individual hypothetical (adj.) is a 1580s term that means "based on or defined by a hypothesis, conjectural," from the Latinized form of the Greek word hypothesis, which means "pertaining to a hypothesis."

to know more about the hypothetical concept here:

brainly.com/question/28260252

#SPJ1

A business wants to evaluate how much they're spending on their customers, versus how much their customers go on to spend. If they want to see how much a customer will spend during the time they're a customer, that measurement would be?

Answers

Since the business wants to evaluate how much they're spending on their customers, versus how much their customers go on to spend. The measurement that a business would use to evaluate how much a customer will spend during the time they are a customer is called Customer Lifetime Value (CLV).

What is Customer Lifetime Value (CLV)?

CLV is a prediction of the net profit attributed to the entire future relationship with a customer. It is calculated by multiplying the average value of a sale by the number of repeat transactions and the average retention time.

Therefore, based on the above, CLV can be used to identify which customers are the most valuable to a business and to allocate resources accordingly.

Learn more about business from

https://brainly.com/question/28464469

#SPJ1

Grayson is creating a program to keep track of how much money he earns and spends each week.he earns and spends each week. He wants to know if he has enough for ice cream? What data should he use to store his answer

Answers

Since Grayson uses a program that allows him to keep track of how much money he earns and spends each week. The type of data that will be used to give him the answer to the question is option A: "Boolean".

What is the program  about?

A Boolean variable can hold only two values: true or false.

He can use a conditional statement to check if the amount of money he has left over after subtracting his expenses from his earnings is greater than or equal to the cost of the ice cream. If it is, he can set the Boolean variable to "True", indicating that he has enough money for ice cream. If it is not, he can set the Boolean variable to "False", indicating that he does not have enough money.

Therefore, Grayson can compare the value of his remaining money to the cost of the ice cream, if the remaining money is greater than or equal to $4, he can set the Boolean variable to "True" which means he has enough money.

Learn more about program from
https://brainly.com/question/24613235

#SPJ1

See full question below

Grayson uses a program that allows him to keep track of how much money he earns and spends each week. Which type of data will be used to give him the answer to the following question?

"Do I have $4 to buy ice cream?"

Boolean

Images

Numbers

Text

Other Questions
explain the significance of civil labor force blue collar workers white collar workers service workers service workers unskilled workers semiskilled workers skilled workers professinalals minum wage Concluding statement about electricity like a sentence or twoThings are:Wind turbines Hydroelectric Geothermal heat Write it in like a concluding statement feel 3 Dylan needs to buy new contact lenses. His ophthalmologist sells 8-lens boxes inpacks of 2 for $52 and 10-lens boxes in packs of 4 for $120. Which option is thebetter deal? Please give me topics for a persuasive essay, any ideas that you believe to be controversial (I prefer to not do anything political) which of the following is most benficial in facilitating a brand's expansion into new markets Which of the following groups of algae is notable for having members with silica cell walls?a) Phaeophyta b) Chlorophyta c) Chrysophyta d) Rhodophyta Winston has a savings in a bank and was surprised that his moneyaccumulated to P 65. 000 after 3 years. He knew that the bank offered him 5%interest rate compounded bimonthly. How much was his sayings at the start? Place in order the stages of a market experiencing a shortage and then regaining equilibrium.1.) A popular celebrity endorses a product. 2.) Demand for the product increases. 3.) More items are purchased than are being manufactured. 4.) Sellers raise prices, which causes a partial but not complete pullback of demand. 5.) Sellers use increased revenue to fund increased production. 6.) Supply again matches demand. Thirty eight students are going on a field trip. Parents will drive. Each car can hold 4 students along with the driver. How many cars will be needed? which american gesture would be inappropriate to make in many spanish-speaking countries? Two-verb situations. Rewrite each sentence to reflect the second option for pronoun placement given the two-verb situation. Please capitalize ANDuse punctuation.1. Yo me tengo que lavar la cara.2. T necesitas lavarte las manos.3. Maana mis hijos van a despertarse tarde.4. Mi esposo se necesita afeitar la cara cada maana.5. Yo necesito acostarme temprano. which shift in global power characterizes the beginning of the mordern era? A nurse is caring for a client who has a chest tube following a lobectomy. Which of the following items should the nurse keep easily accessible for the client?A. Extra drainage systemB. Suture removal kitC. Container of sterile waterD. Nonadherent pads How did Adams relationship with congress affect his presidency True or False: The Ottomans' weakness was becoming apparent toEuropean powers, who were expanding their territories. They began to lookfor ways to take the lands away from the Ottomans.TrueFalse 4 List the advantages and disadvantages of tropical forests and rainforests. A conflict theorist is most likely to reference which concept in order to explain the causes of access disparities for SUD treatment Refer to Figure 4-6. What is the movement from S to S1 called?a. a decrease in supplyb. a decrease in quantity suppliedc. an increase in supplyd. an increase in quantity supplied A women went to Shopping.First she spent 4/5th of all money she had in her purse, and then she lost 2/3 of what was remaining. Now she has 10$ left. How much money did she spent? The odometer of a car reads 35,467.219 the 5 stands for 5 x1,000 miles. Use expanded form to show what each of the other digits in the odometer reading means.