Answer:
A. Make Laws
Explanation:
Montesquieu believed the ways to go about limiting the power of a monarch would be to split up power among 3 groups, Judicial, Legislative and Executive. The American Presidential system and Constitution used Montesquieu's writings as a foundation for their principles.
Judicial Interprets lawsLegislative Makes lawsExecutive Enforces LawThe common field cricket chirps in direct proportion to the current temperature. Adding 40 to the number of times a cricket chirps in a minute, then dividing by 4, gives us the temperature (in Fahrenheit degrees). Write a program that accepts as input the number of cricket chirps in fifteen seconds, then outputs the current temperature
Answer:
This program is written in Java programming language;
First, you should understand that:
The formula given in the question implies that the current temperature can only be calculated using measurement of time in minutes;
Given that the number of chirps is directly proportional to the temperature.
If the cricket made n chirps in 15 seconds, it will make n * (60/15) chirps in 1 minutes;
n * (60/15) = n * 4
Base on this analysis, the program is as follows
import java.util.*;
public class cricket
{
public static void main(String []args)
{
//Declare number of chips in 1 minutes
int num;
Scanner input = new Scanner(System.in);
//Prompt user for input
System.out.print("Number of chirps (in 15 seconds): ");
num = input.nextInt();
//Calculate temperature (multiply temperature by 4 to get number of chirps in minutes
double temp = (num * 4+ 40)/4;
//Print temperature
System.out.print("Current Temperature = "+temp+" F");
}
}
Translate each statement into a logical expression. Then negate the expression by adding a negation operation to the beginning of the expression. Apply De Morgan's law until each negation operation applies directly to a predicate and then translate the logical expression back into English.
Sample question: Some patient was given the placebo and the medication. ∃x (P(x) ∧ D(x)) Negation: ¬∃x (P(x) ∧ D(x)) Applying De Morgan's law: ∀x (¬P(x) ∨ ¬D(x)) English: Every patient was either not given the placebo or not given the medication (or both).(a) Every patient was given the medication.(b) Every patient was given the medication or the placebo or both.(c) There is a patient who took the medication and had migraines.(d) Every patient who took the placebo had migraines. (Hint: you will need to apply the conditional identity, p → q ≡ ¬p ∨ q.)
Answer:
Explanation:
To begin, i will like to break this down to its simplest form to make this as simple as possible.
Let us begin !
Here statement can be translated as: ∃x (P(x) ∧ M(x))
we require the Negation: ¬∃x (P(x) ∧ M(x))
De morgan's law can be stated as:
1) ¬(a ∧ b) = (¬a ∨ ¬b)
2) ¬(a v b) = (¬a ∧ ¬b)
Also, quantifiers are swapped.
Applying De Morgan's law, we have: ∀x (¬P(x) ∨ ¬M(x)) (∃ i swapped with ∀ and intersecion is replaced with union.)
This is the translation of above
English: Every patient was either not given the placebo or did not have migrane(or both).
cheers i hope this helped !!
You can add additional design elements to a picture by adding a color background, which is accomplished by using what Paint feature?
Pencil tool
Shapes tool
Color Picker tool
Fill with Color tool
Answer:
Fill with Color tool
Which of the following is NOT a type of software?
O a database system
O Skype
O Microsoft PowerPoint
O an output device
Previous
Noyt
Answer:
Output device
Explanation:
Im pretty sure that correct
Write a program that accepts any number of homework scores ranging in value from 0 through 10. Prompt the user for a new value if they enter an alphabetic character. Store the values in array. Calculate the average excluding the lowest and highest scores. Display the average as well as the highest and lowest score that were discarded.
Answer:
This program is written in C++
Note that the average is calculated without the highest and the least value.
Comments are used for explanatory purpose
See attachment for .cpp file.
Program starts here
#include<iostream>
using namespace std;
int main()
{
int num;
cout<<"Enter Number of Test [0-10]: ";
//cin>>num;
while(!(cin>>num) || num > 10|| num<0)
{
cout << "That was invalid. Enter a valid digit: "<<endl;
cin.clear(); // reset the failed input
cin.ignore(123,'\n');//Discard previous input
}
//Declare scores
int scores[num];
//Accept Input
for(int i =0;i<num;i++)
{
cout<<"Enter Test Score "<<(i+1)<<": ";
cin>>scores[i];
}
//Determine highest
int max = scores[0];
for (int i = 1; i < num; i++)
{
if (scores[i] > max)
{
max = scores[i];
}
}
//Determine Lowest
int least = scores[0];
for (int i = 1; i < num; i++)
{
if (scores[i] < least)
{
least = scores[i];
}
}
int sum = 0;
//Calculate total
for(int i =0; i< num;i++)
{
sum += scores[i];
}
//Subtract highest and least values
sum = sum - least - max;
//Calculate average
double average = sum / (num - 2);
//Print Average
cout<<"Average = "<<average<<endl;
//Print Highest
cout<<"Highest = "<<max<<endl;
//Print Lowest
cout<<"Lowest = "<<least;
return 0;
}
Pretend that your mother is a real estate agent and that she has decided to automate her daily tasks by using a laptop computer. Consider her potential hardware and software needs and create a hardware and software specification that describes them. The specification should be developed to help your mother buy her hardware and software on her own.
The specification should be developed to help your mother buy her hardware and software on her own is hardware.
Which is hardware?Hardware refers back to the computer's tangible additives or shipping structures that shop and run the written commands furnished through the software program. The software program is the intangible a part of the tool that shall we the consumer have interaction with the hardware and command it to carry out unique tasks.
A few automatic software programs could ship messages, alert and notifications to the customer in addition to the owner.The pc need to be of respectable potential and processing pace three. Video calling software program to have interaction with the clients. Softwares like Excel to keep the information and all An running gadget of right here convenience 4.320 to 500 GB difficult drive three.2.2 GHz of processor. Long battery life Software: three GB RAM.Read more about the hardware :
https://brainly.com/question/3273029
#SPJ2
What is the maximum duration of daily Scrum meetings?
Answer:
15 minutes
Explanation:
this meeting is normally timeboxed to a maximum duration of 15 minutes.
Answer:
A. 15 minutes
B. 45 minutes
C. 10 minutes
D. 30 minutes
The Answer is A): 15 minutes
explanation:
PLZ Mark Me As Brainliest
The beginning of a free space bitmap looks like this after the disk partition is first formatted: 1000 0000 0000 0000 0000 0000 0000 0000 (the first block is used by the root directory). The system always searches for free blocks starting at the lowest numbered block, so after writing file A, which uses 8 blocks, the bitmap looks like this 1111 1111 1000 0000 0000 0000 0000 0000. Show the bitmap after each of the following actions: (a) File B is written, using 12 blocks (b) File C is written, using 7 blocks (c) File A is deleted (d) File B is deleted (e) File D is written, using 6 blocks (f) File E is written, using 9 blocks Show all steps.
The bitmap is 1110 0000 0001 0000 after some use. The system always looks for free blocks beginning using a contiguous allocation technique.
What is a bitmap?After some use, the new bitmap is 1110 0000 0001 0000. The system employs a contiguous allocation mechanism and starts searching for free blocks at the position.
(a) File B is made up of five blocks, 1111 1111 1111 0000.
b) The batch number 1000 0001 1111 0000 deletes File A.
c) Eight blocks are used for writing in file C.
1111 1111 1111 1100
File B is deleted (d). 1111 1110 0000 1100
Free-space bitmaps are one method used by some file systems to keep track of allocated sectors. Even though the most fundamental implementation of free-space bitmaps is incredibly wasteful, some modern file systems use complex or hybrid versions of them.
Therefore, after some use, the bitmap is 1110 0000 0001 0000. The contiguous allocation strategy is always used by the system to look for free blocks to start with.
To learn more about bitmap, refer to the link:
https://brainly.com/question/26230407
#SPJ2
) If FIFO page replacement is used with five page frames and eight pages, how many page faults will occur with the reference string 236571345157245 if the five frames are initially empty?
Answer:
There are a total of 8 page faults.
Explanation:
In FIFO page replacement, the requests are executed as they are received. The solution is provided in the attached figure. The steps are as follows
Look for the digit in the pages. if they are available, there is no page fault. If the digit does not exist in the page frames it will result in an error.
An assault on system security that derives from an intelligent act that is a deliberate attempt to evade security services and violate the security policy of a system is a(n) _________.
A. Risk
B. Attack
C. Asset
D. Vulnerability
Answer:
Option B: Attack
Explanation:
A security attack is an act to access to a system without a legit authorization. Usually the aim is to steal confidential info from the system or control the system by manipulating the data stored in the system. Some attacks are also aimed to disable the operation of the hacked system. Nowadays, there are several common types of security attacks which include
phishingransomwaredenial of servicemain in the middleSQL injectionmalwareMax magnitude Write a method maxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the method in a program that takes two integer inputs, and outputs the largest magnitude value. Ex: If the inputs are: 5 7 the method returns: 7 Ex: If the inputs are: -8 -2 the method returns: -8 Note: The method does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math method. Your program must define and call a method: public static int maxMagnitude(int userVal1, int userVal2)
Answer:
The java program is as follows.
import java.lang.*;
public class Numbers
{
//variables to hold two numbers
static int num1=-8, num2=-2;
//method to return integer with higher magnitude
public static int maxMagnitude(int userVal1, int userVal2)
{
if(Math.abs(userVal1) > Math.abs(userVal2))
return userVal1;
else
return userVal2;
}
public static void main(String[] args) {
int max = maxMagnitude(num1, num2);
System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);
}
}
OUTPUT
The number with higher magnitude among -8 and -2 is -8
Explanation:
1. Two integer variables are declared to hold the two numbers. The variables are declared at class level (outside main()) and declared static.
2. The variables are initialized with any random value.
3. The method, maxMagnitude(), takes the two integer parameters and returns the number with higher magnitude. Hence, return type of the method is int.
public static int maxMagnitude(int userVal1, int userVal2)
4. This method finds the number with higher magnitude using the Math.abs() method inside if-else statement.
if(Math.abs(userVal1) > Math.abs(userVal2))
return userVal1;
else
return userVal2;
5. Inside main(), the method, maxMagnitude(), is called. This method takes the two variables as input parameters.
6. The integer returned by the method, maxMagnitude() is assigned to a local integer variable, max, as shown.
int max = maxMagnitude(num1, num2);
7. The result is displayed to the user as shown.
System.out.println("The number with higher magnitude among "+num1+ " and "+num2+ " is "+max);
8. The class variables and the method, maxMagnitude(), are declared static so that they can be used and called inside main().
9. The variable, max, is called local variable since it can be used only within the main() where it is declared. It is not declared static.
10. The class is declared public since it has the main() method and execution begins with main().
11. The program is saved with the same name as the name of the public class having main(). In this case, the program is saved as Numbers.java.
12. No user input is taken for the two input parameter values. The static variables can be assigned any integer value and the program can be tested accordingly.
Given: The following if statement uses an overloaded > operator to determine whether the price of a Car object is more than $5000. Car is a struct and myCar is an object of Car. Each Car object has two variables: id (int) and price (float). As you can see in the following code, the ID of myCar is 12345 and the price is $6,000.
Car myCar = {12345, 6000.};
float price = 5000;
if (myCar > price)
cout << "My car price is more than $5,000.\n";
Which one of the following function prototypes is correct syntax to overload the > operator based on the if statement above.
a. void operator>(float price);
b. bool operator>(Car& car, float price);
c. bool operator >(float amt);
d. bool operator>(Car& yourCar);
e. none of the above
Answer:
Option(c) is the correct answer to the given question.
Explanation:
In the given question car is the structure and mycar is the instance or the object of the class also the object mycar holds two variables of type integer and the one float variable .
Following are the syntax of operator overload in C++ programming language
return -type operator operator-symbol(datatype variable name )Now according to the question the option(c) follows the correct syntax of operator overload
All the other option do not follow the correct prototype that's why these are incorrect option .
The IBM 370 mainframe computer was introduced in 1970. The 370 Model 145 could hold up to 524,288 bytes of data (512 Kbytes). It cost $1,783,000.00 to buy (or $37,330/month to rent). A notebook computer today holds 16 Gbytes of memory and costs $2,500 to buy. If you assume that 100% of the price is just the memory, for both computers:
• how much did 1 Kbyte of memory in the IBM computer cost?
• how much does 1 Kbyte of memory in the laptop cost?
• how many times cheaper is the memory in the laptop than memory in the mainframe?
• what factor is today’s computer cheaper than the IBM 370?
Answer:
a) $3482.4 per Kbyte
b) $0.000149 per Kbyte
c) The laptop is 23369991 times cheaper than the mainframe computer
d) Today's computer is 23369991 times cheaper than IBM 370
Explanation:
a) The 370 Model 145 could hold up to 524,288 bytes of data
one Kb = 1024 bytes, therefore 524,288 bytes = 524288/1024 Kbytes= 512 Kbytes. It cost $1,783,000.00 to buy (or $37,330/month to rent).
Since 100% of the price is just the memory
Cost per 1 Kb = cost of computer / memory
Cost per 1 Kb = $1,783,000 / 512 Kb = $3482.4 per Kbyte
b) A notebook computer today holds 16 Gbytes of memory
one Kb = 1024 bytes, 1024 Kb = 1 Mbyte, 1024 Mbytes = 1 Gbyte.
Therefore 16 Gbytes = (16 * 1024 * 1024) Kbytes = 16777216 Kbytes. It cost $2500 to buy
Since 100% of the price is just the memory
Cost per 1 Kb = cost of computer / memory
Cost per 1 Kb = $2500 /16777216 Kb = $0.000149 per Kbyte
c) Cost per 1 Kb for mainframe/ Cost per 1 Kb for laptop = $3482.4 per Kbyte / $0.000149 per Kbyte = 23369991
The laptop is 23369991 times cheaper than the mainframe computer
d) Today's computer is 23369991 times cheaper than IBM 370
Write the class "Tests". Ensure that it stores a student’s first name, last name, all five test scores, the average of those 5 tests’ scores and their final letter grade. (Use an array to store all test scores.)
Answer:
The following assumption will be made for this assignment;
If average score is greater than 75, the letter grade is AIf average score is between 66 and 75, the letter grade is BIf average score is between 56 and 65, the letter grade is CIf average score is between 46 and 55, the letter grade is DIf average score is between 40 and 45, the letter grade is EIf average score is lesser than 40, the letter grade is FThe program is written in Java and it uses comments to explain difficult lines. The program is as follows
import java.util.*;
public class Tests
{
public static void main(String [] args)
{
//Declare variables
Scanner input = new Scanner(System.in);
String firstname, lastname;
//Prompt user for name
System.out.print("Enter Lastname: ");
lastname = input.next();
System.out.print("Enter Firstname: ");
firstname = input.next();
char grade;
//Declare Array
int[] Scores = new int[5];
//Initialize total scores to 0
int total = 0;
//Decalare Average
double average;
//Prompt user for scores
for(int i =0;i<5;i++)
{
System.out.print("Enter Score "+(i+1)+": ");
Scores[i] = input.nextInt();
//Calculate Total Scores
total+=Scores[i];
}
//Calculate Average
average = total/5.0;
//Get Letter Grade
if(average>75)
{
grade = 'A';
}
else if(average>65)
{
grade = 'B';
}
else if(average>55)
{
grade = 'C';
}
else if(average>45)
{
grade = 'D';
}
else if(average>40)
{
grade = 'E';
}
else
{
grade = 'F';
}
//Print Student Results
System.out.print("Fullname: "+lastname+", "+firstname);
System.out.print('\n');
System.out.print("Total Scores: "+total);
System.out.print('\n');
System.out.print("Average Scores: "+average);
System.out.print('\n');
System.out.print("Grade: "+grade);
}
}
See Attachment for .java file
7d2b:00a9:a0c4:0000:a772:00fd:a523:0358 What is IPV6Address?
Answer:
From the given address: 7d2b:00a9:a0c4:0000:a772:00fd:a523:0358
We can see that:
There are 8 groups separated by a colon.Each group is made up of 4 hexadecimal digits.In general, Internet Protocol version 6 (IPv6) is the Internet Protocol (IP) which was developed to deal with the expected anticipation of IPv4 address exhaustion.
The IPv6 addresses are in the format of a 128-bit alphanumeric string which is divided into 8 groups of four hexadecimal digits. Each group represents 16 bits.
Since the size of an IPv6 address is 128 bits, the address space has [tex]2^{128}[/tex] addresses.
Which one of these is not a way of identifying that a website is secure?
a) Message on website
b) URL begins 'https://'
c) Colour of address bar
d) Padlock symbol
Answer:
B
Explanation:
all url's begin with https://
Consider the following class definitions.
public class Robot
{
private int servoCount;
public int getServoCount()
{
return servoCount;
}
public void setServoCount(int in)
{
servoCount = in;
}
}
public class Android extends Robot
{
private int servoCount;
public Android(int initVal)
{
setServoCount(initVal);
}
public int getServoCount()
{
return super.getServoCount();
}
public int getLocal()
{
return servoCount;
}
public void setServoCount(int in)
{
super.setServoCount(in);
}
public void setLocal(int in)
{
servoCount = in;
}
}
The following code segment appears in a method in another class.
int x = 10;
int y = 20;
/* missing code */
Which of the following code segments can be used to replace /* missing code */ so that the value 20 will be printed?
A Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
B Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getLocal());
C Android a = new Android(x);
a.setLocal(y);
System.out.println(a.getServoCount());
D Android a = new Android(y);
a.setServoCount(x);
System.out.println(a.getLocal());
E Android a = new Android(y);
a.setLocal(x);
System.out.println(a.getLocal());
Answer:
The correct answer is option A
Explanation:
Solution
Recall that:
From the question stated,the following segments of code that should be used in replacing the /* missing code */ so that the value 20 will be printed is given below:
Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
The right option to be used here is A.
Based on the information given, the code segments that's appropriate will be A Android a = new Android(x);
a.setServoCount(y);System.out.println(a.getServoCount());From the question stated, it was inferred that we should get the segments of code that should be used in replacing the /* missing code */ so that the value 20 will be printed.
This will be:
Android a = new Android(x);
a.setServoCount(y);
System.out.println(a.getServoCount());
In conclusion, the correct option is A.
Learn more about codes on:
https://brainly.com/question/22654163
You have decided that the complexity of the corporate network facility and satellite offices warrants the hiring of a dedicated physical security and facilities protection manager. You are preparing to write the job requisition to get this critical function addressed and have solicited some ideas from the PCS working group members regarding physical and environmental security risks. Discuss the operational security functions that the physical security and facilities protection manager would be responsible for. Discuss how these functions would inform the development and implementation of system related incident response plans. Further discuss how these incident response plans fit into business continuity planning. Include at least one research reference and associated in-text citation using APA standards. In yourreplies to your peers further discuss how the concepts improve the security posture of PCS.
Answer:
All organizational security functions are as follows:
i) Classify any vital data
ii) Analyze of the hazard
iii) Analyze vulnerability
iv) Assess the risk
v) Take the appropriate risk prevention measures.
Explanation:
These methods described the incident that will fit into this business model was its ongoing support and control of its system that involves the improvements and fix bugs. For above-mentioned mechanisms aid in evaluating potential events/attacks and help reduce the risk involved with these, as well as promote network security by reducing the likelihood of any harm. In this case, appropriate monitoring and monitoring should be a must.Mikayla wants to create a slide with a photograph of a car and the car horn sounding when a user clicks on the car. Which
feature should she use, and why?
a. She should use the Action feature because it allows a user to embed a hyperlink for an Internet video on the car.
b. She should use the Video from Website feature because it allows a user to embed a hyperlink for an Internet video on the car.
c. She should use the Action feature because it allows a user to place an image map with a hotspot on the car.
d. She should use the Video from Website feature because it allows a user to place an image map with a hotspot on the car.
Answer: A
Explanation: edge :)
Answer:
C
Explanation:
Someone help me with this
Answer:
(b) public String doMath(int value){
return " " + (value * 3);
}
Explanation:
Two of the answers doesn't even have a variable to pass into. In order, to return a String the return " " in b will do this. Therefore, I think the answer is b.
Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not following that format is incorrect and should be ignored. Use the substring() method to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3/1/1990.
Ex: If the input is:
March 1, 1990
April 2 1995
7/15/20
December 13, 2003
-1
then the output is:
3/1/1990
12/13/2003
Given Code:
import java.util.Scanner;
public class DateParser {
public static int getMonthAsInt(String monthString) {
int monthInt;
// Java switch/case statement
switch (monthString) {
case "January":
monthInt = 01;
break;
case "February":
monthInt = 02;
break;
case "March":
monthInt = 03;
break;
case "April":
monthInt = 04;
break;
case "May":
monthInt = 05;
break;
case "June":
monthInt = 06;
break;
case "July":
monthInt = 07;
break;
case "August":
monthInt = 8;
break;
case "September":
monthInt = 9;
break;
case "October":
monthInt = 10;
break;
case "November":
monthInt = 11;
break;
case "December":
monthInt = 12;
break;
default:
monthInt = 00;
}
return monthInt;
}
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
// TODO: Read dates from input, parse the dates to find the one
// in the correct format, and output in mm/dd/yyyy format
}
}
Using the knowledge in computational language in C++ it is possible to write a code that complete main() to read dates from input, one date per line
Writting the code:#include <iostream>
#include <string>
using namespace std;
int DateParser(string month) {
int monthInt = 0;
if (month == "January")
monthInt = 1;
else if (month == "February")
monthInt = 2;
else if (month == "March")
monthInt = 3;
else if (month == "April")
monthInt = 4;
else if (month == "May")
monthInt = 5;
else if (month == "June")
monthInt = 6;
else if (month == "July")
monthInt = 7;
else if (month == "August")
monthInt = 8;
else if (month == "September")
monthInt = 9;
else if (month == "October")
monthInt = 10;
else if (month == "November")
monthInt = 11;
else if (month == "December")
monthInt = 12;
return monthInt;
}
int main ()
{
// TODO: Read dates from input, parse the dates to find the one
// in the correct format, and output in m/d/yyyy format
while(1)
{
//declaring the required variables
int monthInt,dayInt,yearInt;string input;
//receive the input string frim the user
getline(cin,input);
//if the input is -1 then quit
if(input=="-1")
break;
//else try to process the input
try
{
//find and extract the month name and parse it to monthInt
monthInt=DateParser(input.substr(0,input.find(' ')));
//find and extract the day and parse it to dayInt
dayInt=stoi(input.substr(input.find(' '),input.find(", ")));
//find and extract the year and parse it to yearInt
yearInt=stoi(input.substr(input.find(", ")+1,input.length()));
//display the output
cout<<monthInt<<"/"<<dayInt<<"/"<<yearInt<<endl;
}
//catch if any of the exceptions happens
catch(exception& e){}
}
}
See more about C++ at brainly.com/question/19705654
#SPJ1
Alcatel-Lucent's High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. This works because the HLN:_____________.
a. Reduces or eliminates use of finite (non-renewable) radio frequencies utilized by wireless devices.
b. Reduces Radio Frequency Interference (RFI) - overcrowding of specific areas of the electromagnetic spectrum.
c. Limits the number of people who can access the network at any one time —particularly during times of peak energy demand.
d. Delivers increased bandwidth using fewer devices and energy.
Answer:
d. Delivers increased bandwidth using fewer devices and energy.
Explanation:
Alcatel-Lucent, formed in 1919 was a French global telecommunications equipment manufacturing company with its headquarter in Paris, France.
They provide services such as telecommunications and hybrid networking solutions deployed both in the cloud and properties.
Alcatel-Lucent's High Leverage Network (HLN) increases bandwidth and network capabilities while reducing the negative impact on the environment. This works because the High Leverage Network (HLN) delivers increased bandwidth using fewer devices and energy on Internet Protocol (IP) networks.
The Alcatel-Lucent's High Leverage Network (HLN) provides reduced cost of transmitting data as fewer network equipments are used with less adverse effects on the environment.
The High Leverage Network (HLN) when successfully implemented helps telecom firms to improve their operational efficiency, maintenance costs, and enhance network performance and capacity to meet the bandwidth demands of their end users.
Write Python code to save the data to a MongoDB collection:Import json module to parse JSON dataImport MongoClient from pymongo to use MongoDBCreate a loop to iterate through the variable with data from Twitter, and for each tweet:Parse these related values: id, text, created_at, user’s screen_name, retweet_count, favorite_count, lang.Use MongoDB’s insert method to add the parsed tweet values to MongoDB collection;Write Python code to query the database:Use find method to search for tweets with lang="en";Use the aggregate method with $sum to compute the total retweets;Use the aggregate method with $count and $group to count the number of tweets by each user (screen_name);
Answer:
Explanation:
The objective of this task is to compute a program that involves the usage of Python code to save the data to MongoDB and to query the database.
Due to the error that occur which makes me to be unable to submit this answer, I've created a word document instead and the attached file can be found below.
Thanks!
Account Balance Design a hierarchy chart or flowchart for a program that calculates the current balance in a savings account. The program must ask the user for:________.
A- The starting balance
B- The total dollar amount of deposits made
C- The total dollar amount of withdrawals made
D- The monthly interest rate
Once the program calculates the current balance, it should be displayed on the screen.
Answer:
a. starting balance
Explanation:
A program that calculates the current balance of a savings should ask the user for the starting balance and then ask for the annual interest rate. A loop should then iterate once for every month of the savings period in order to perform other tasks such as asking the user for the total amount deposited into the account, the total amount withdrawn from the account, and calculate the interest rate. The program will then proceed to display the result at the end of the savings period.
Create an empty list called resps. Using the list percent_rain, for each percent, if it is above 90, add the string ‘Bring an umbrella.’ to resps, otherwise if it is above 80, add the string ‘Good for the flowers?’ to resps, otherwise if it is above 50, add the string ‘Watch out for clouds!’ to resps, otherwise, add the string ‘Nice day!’ to resps. Note: if you’re sure you’ve got the problem right but it doesn’t pass, then check that you’ve matched up the strings exactly.
Answer:
resps = []
percent_rain = [77, 45, 92, 83]
for percent in percent_rain:
if percent > 90:
resps.append("Bring an umbrella.")
elif percent > 80:
resps.append("Good for the flowers?")
elif percent > 50:
resps.append("Watch out for clouds!")
else:
resps.append("Nice day!")
for r in resps:
print(r)
Explanation:
*The code is in Python.
Create an empty list called resps
Initialize a list called percent_rain with some values
Create a for loop that iterates through the percent_rain. Check each value in the percent_rain and add the required strings to the resps using append method
Create another for loop that iterates throgh the resps and print the values so that you can see if your program is correct or not
Answer:
resps = []
for i in percent_rain:
if i > 90:
resps.append("Bring an umbrella.")
elif i >80:
resps.append("Good for the flowers?")
elif i > 50:
resps.append("Watch out for clouds!")
else:
resps.append("Nice day!")
Explanation:
For this assignment, you will create flowchart using Flowgorithm and Pseudocode for the following program example:
Hunter Cell Phone Company charges customer's a basic rate of $5 per month to send text messages. Additional rates apply as such:
The first 60 messages per month are included in the basic bill
An additional 10 cents is charged for each text message after the 60th message and up to 200 messages.
An additional 25 cents is charged for each text after the 200th message
Federal, state, and local taxes add a total of 12% to each billThe company wants a program that will accept customer's name and the number of text messages sent. The program should display the customer's name and the total end of the month bill before and after taxes are added.
Answer:
The pseudocode is as given below in the explanation while the flow diagram is attached herewith
Explanation:
The pseudocode is as follows
input cust_name, num_texts
Set Main_bill=5 $;
if the num_texts is less than or equal to 60
Excess_Charge=0;
If the num_texts is greater than 60 and less than or equal to 200
num_text60200 =num_texts-60;
Excess_Charge=0.1*(num_text60200);
else If the num_texts is greater than 60
num_texts200 =num_texts-200;
Excess_Charge=0.25*(num_texts200)+0.1*(200-60);
Display cust_Name
Total_Bill=Main_bill+Excess_Charge;
Total_Bill_after_Tax=Total_Bill*1.12;
Design an algorithm for a monitor that implements an alarm clock that enables a calling program to delay itself for a specified number of time units (ticks). You may assume the existence of a real hardware clock that invokes a function tick() in your monitor at regular intervals.
Answer:
The algorithm a monitor that implements an alarm clock is designed below.
Monitor alarm
{
Condition c;
int current = 0;
void delay (int ticks)
{
int alarms;
alarms = current + ticks;
while (current > alarms)
c. wait (alarms) ;
c. signal;
}
void tick ( )
{
current = current + 1;
delay. signal;
}
}
Universal Containers has two customer service contact centres and each focuses on a specific product line. Each contact centre has a varying call volume, contributing to a high operational cost for the company. Universal Containers wants to optimize the cost without compromising customer satisfaction.; What can a consultant recommend to accomplish these objectives?
A. Prioritize customer calls based on their SLA
B. Cross-train agents on both product lines
C. Enable agents to transfer calls to other agents
D. Implement a customer self-service portal
Answer:
B. Cross-train agents on both product lines
D. Implement a customer self-service portal
Explanation:
Cross-training is a way of teaching employees different aspects of the job so that they can have a measure of flexibility in the discharge of duties. Managers find this approach to be effective as they believe it saves cost and maximizes the usefulness of employees. It also helps to serve and satisfy a wider range of customers.
So for Universal Containers seeking to optimize cost without compromising customer satisfaction while managing two customer service contact centers, an effective way of dealing with the large call volumes is cross-training agents on both product lines so that they can attend to a wider range of customers. Cross-training agents on both product lines would make them more knowledgeable of the services being offered and this would minimize the need to transfer calls as all agents can provide information on the various products.
Implementing a customer self-service portal would also reduce the workload on the customer service agents as customers can access the information they need on their own.
You just got back from a convention where you saw some new software you think the information technology director could use. You can get a discount on the software for the next six weeks because you attended the convention. Unfortunately, the technology director is on vacation this week. How should you tell the IT director about this opportunity
Answer:
Video or Teleconferencing.
Explanation:
Solution
The method in which you will inform the IT director about this opportunity is through video conferencing or tele conferencing.
Video conferencing : refers to a method whereby it enables people at two or more locations or places to hear and see each other simultaneously through computers and communication technology.
what is exchanged between them are information such as visual web cameras and online streaming videos.
Teleconferencing: It is a method of sharing or discussion information and news among a large group of people or team at different places at the same time.
. The total processing speed of microprocessors (based on clock rate and number of circuits) is doubling roughly every year. Today, a symmetric session key needs to be 100 bits long to be considered strong. How long will a symmetric session key have to be in 30 years to be considered strong?
Answer:
130 bits
Explanation:
If the length of a key = N bits
Total number of key combinations = [tex]\frac{2^{N} }{2}[/tex]
For a key length of 100, the total number of key combinations will be [tex]\frac{2^{100} }{2} = 2^{99}[/tex] combinations. This is a whole lot and it almost seems impossible to be hacked.
The addition of one bit to the length of the symmetric key in 1 year is sufficient to make the key strong, because even at double its speed, the processor can still not crack the number of combinations that will be formed.
Therefore, if a bit is added to the key length per year, after 30 years, the length of the symmetric session key will be 130 bits.