Answer:
harris_poll_ranking = int(input("Enter team's Harris Poll ranking [1 - 2,850]: "))
coaches_poll_ranking = int(input("Enter team's Coaches Poll ranking [1 - 1,475]: "))
computer_ranking = float(input("Enter team's computer ranking [0 - 1]: "))
harris_poll_score = harris_poll_ranking / 2850
coaches_poll_score = coaches_poll_ranking / 1475
bcs_score = harris_poll_score / 3 + coaches_poll_score / 3 + computer_ranking / 3
print(bcs_score)
Explanation:
*The code is in Python.
Ask the user to enter the harris_poll_ranking as int, coaches_poll_ranking as int and computer_ranking as float
Calculate the harris_poll_score, divide the harris_poll_ranking by 2850
Calculate the coaches_poll_score, divide the coaches_poll_ranking by 1475
Calculate the bcs_score, harris_poll_score, coaches_poll_score and computer_ranking by 3 and sum them
Print the bcs_score
That is none other than a "Trojan Horse"
The bastion host node is typically an influential server with better-quality security actions and custom software. It frequently hosts only a single request because it wants to be very good at whatever it does. The software is commonly modified, limited and not obtainable to the public. This host is envisioned to be the strong fact in the network to care for the system last it. Therefore, it often endures unvarying maintenance and audit. Occasionally bastion hosts are used to draw occurrences so that the basis of the attacks may be outlined. The bastion host practices and filters all inward traffic and averts malicious traffic from incoming the network, acting much like a gateway.
Answer:
- food_category = {
- "Fruits": ["Apple", "Strawberries", "Orange"],
- "Vegetables": ["Carrots", "Peas", "Onions"],
- "Meats": ["Chicken", "Beef", "Mutton"]
- }
-
- for cat in food_category:
- output = cat + ": "
- for food in food_category[cat]:
- output += food + ", "
- print(output)
-
- answer = input("Do you want to add category or food (Y - Yes N - No): ")
-
- while(answer == "Y"):
- choice = input("New Category (N) or New Food (nf): ")
-
- if(choice == "N"):
- new_cat = input("Enter new category name: ")
- if(new_cat not in food_category):
- food_category[new_cat] = ""
- elif(choice == "nf"):
- cat = input("Enter category: ")
- new_food = input("Enter new food name: ")
- food_category[cat].append(new_food)
-
- answer = input("Do you want to add new category or food (Y - Yes N - No): ")
-
- print("All food categories: ")
- for cat in food_category:
- print(cat)
-
- selected_cat = input("Select a category to view the food list: ")
- output = ""
- for food in food_category[selected_cat]:
- output += food + ", "
- print(output)
Explanation:
The solution code is written in Python 3.
Firstly, create a food category dictionary data structure (Line 1 -5). Next, display all the food category and the food in each category (Line 7 - 11)
Next prompt user to feedback if they wish to add new category or new food (Line 13).
While the answer is yes prompt user to enter their choice, either category or food and use if else if statements to handle the choice made by the user. If the choice is new category, prompt user to enter new category name and check if the new category is already exist in the dictionary. If not, add that category to dictionary (Line 18 - 21).
If the choice is food, nf, prompt user to input food category and enter the new food name and add it to the food_category list (Line 22 - 25).
After that prompt user to enter if they wish to continue to add new data (Line 27).
After collecting all info from user, write a for loop to display all the categories (Line 29 - 31).
At last, prompt user to select a category and display all the food of the selected category (Line 33 - 37).