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.

Answers

Answer 1

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;

       }

}


Related Questions

Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use
compressed air to blow dirt out through the internal slits from inside the case.

Answers

Answer:

Cleaning the fan

Explanation:

Just did it on Ed

Would you mind giving me brainliest?

I need the answer to the below question *ASAP*

Answers

2 4 9

Explanation:

Basically what I thought was the way was, since 2 is first, then its 1, then since 4 is second, it's added second, lastly to get the last oneI added them all and got 9 so that's third.

Answer:

Does not exist.

Explanation:

The answer is not in the option:

Let's analyse the code:

random.randint(2,4)

This means take in random integer numbers starting with 2 and ending with 4.

Meaning numbers : 2, 3 and 4

Next math.pow(a,2) means a× a = a2

So when we input 2 the function;

math.pow(a,2) returns an integer 4

You do same for input 3 , it returns 9.

For input 4 it returns 16.

And the result is encapsulated in the function string(). Meaning display the result as a string:

4 9 16

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

Answers

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 injectionmalware

#Write a function called "scramble" that accepts a string #as an argument and returns a new string. The new string #should start with the last half of the original string #and end with the first half. # #If the length of the string is odd, split the string #at the floor of the length / 2 (in other words, the second #half is the longer half). # #For example: # scramble("abcd") -> "cdab" # screamble("abcde") -> "cdeab" # scramble("railroad")) -> "roadrail" # scramble("fireworks")) -> "worksfire"

Answers

Answer:

def scramble(s):

   if len(s) % 2 == 1:

       index = int(len(s)//2)

   else:

       index = int(len(s)/2)

   

   return s[index:] + s[:index]

Explanation:

Create a function called scramble that takes one parameter, s

Check the length of the s using len function. If the length is odd, set the index as the floor of the length/2. Otherwise, set the index as length/2. Use index value to slice the s as two halves

Return the second half of the s and the second half of the s using slice notation (s[index:] represents the characters from half of the s to the end, s[:index] represents the characters from begining to the half of the s)

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.)

Answers

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 F

The 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

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.

Answers

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:

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

Answers

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 .

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);

Answers

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!

Given the array [13, 1, 3, 2, 8, 21, 5, 1] suppose we choose the pivot to be 1 the second element in the array. Which of the following would be valid partitions?
A. 1 [1, 2, 3, 5, 8, 13, 21]
B. 1 [13, 1, 3, 2, 8, 21, 5]
C. 1 [13, 3, 2, 8, 21, 5, 1]
D. [1] 1 [13, 3, 2, 8, 21, 5]
E. [13] 1 [3, 2, 8, 21, 5, 1]
F. [13, 1, 3, 2, 8, 21, 5] 1 2/4

Answers

Answer:

D. [1] 1 [13, 3, 2, 8, 21, 5]

Explanation:

Using a quicksort with 1 as the pivot point, elements less than 1 will be sorted to the left of 1 and the other elements are greater than one will be sorted to the right of 1. The order doesn't matter. So we sort [1] to the left of 1 and [13, 3, 2, 8, 21, 5] to the right of 1. So, D. [1] 1 [13, 3, 2, 8, 21, 5] is the valid partition.

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.

Answers

Answer: A

Explanation: edge :)

Answer:

C

Explanation:

Write a program that displays the following pattern: ..\.\* .\.\*** \.\***** ******* \.\***** .\.\*** ..\.\* That is, seven lines of output as follows: The first consists of 3 spaces followed by a star. The second line consists of 2 spaces followed by a 3 stars. The third consists of one space followed by 5 stars, and the fourth consists just of 7 stars. The fifth line is identical to third, the sixth to the second and the seventh to the first. Your program class should be called StarPattern

Answers

Answer:

public class StarPattern {

   

   public static final int MAX_ROWS = 7;

   

    public static void main(String []args){

       

       for (int row = 1; row <= MAX_ROWS; row++) {

           int numOfSpaces = getNumberOfSpaces(row);

           int numOfStars = MAX_ROWS - (getNumberOfSpaces(row) * 2);

           String spaces = printSpaces(numOfSpaces);

           String stars = printStars(numOfStars);

           System.out.println(spaces + stars);

       }

       

    }

    public static int getNumberOfSpaces(int row) {

        int rowOffset = (MAX_ROWS / 2) + 1;

        return Math.abs(row-rowOffset);

    }

   

    public static String printSpaces(int num) {

        String result = "";

        for (int i = 0; i < num; i++) {

            result += " ";

        }

        return result;

    }

   

    public static String printStars(int num) {

        String result = "";

        for (int i = 0; i < num; i++) {

            result += "*";

        }

        return result;

    }

}

Explanation:

So it sounds we need to make a diamond shape out of asterisks like this:

  *

 ***

*****

*******

*****

 ***

  *

There are 7 rows and each row has up to 7 characters. The pattern is also symmetrical which makes it easier. Before writing any code, let's figure out how we are going to determine the correct amount of spaces we need to print. There are a lot of ways to do this, but I'll just show one. Let's call the 4th row y=0. Above that we have row 3 which would be y=-1, and below is row 5 which is y=1. With 7 rows, we have y=-3 through y=3. The absolute value of the y value is how many spaces we need.

To determine the number of stars, we just double the number of spaces, then subtract this number from 7. This is because we can imagine that the same amount of spaces that are printed in front of the stars are also after the stars. We don't actually have to print the second set of spaces since it is just white space, but the maximum number of characters in a row is 7, and this formula will always make sure we have 7.

I hope this helps. If you need help understanding any part of the code, jsut let me know.

Someone help me with this

Answers

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.

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?

Answers

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

8) Which of the following statements is FALSE?
1) You will likely need to use a combination of both popular and scholarly resources in your research
2) The CRAAP test can be used to help evaluate all of your sources
3) Academic journal articles are always unbiased in their analysis
4) Popular resources tend to be easier to read than scholarly articles

Answers

Answer:

3) Academic journal articles are always unbiased in their analysis.

Explanation:

The Academic journals are not always unbiased. There can be some authors which may write in some situation and bias the articles. It is important to analyse source and reliability of the article before relying on it. An unbiased author will try to capture picture fairly. The unbiased author presents the facts as it is and does not manipulates the truth.

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.

Answers

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;  

}

Bill downloaded an antivirus software from the Internet. Under the Uniform Commercial Code (UCC), the software is a: Select one: a. good. b. service. c. good-faith warranty. d. mixture of goods and services.

Answers

Answer:

a. good

Explanation:

According to the Uniform Commercial Code (UCC), It deals with all the contracts that also involves the sale of the goods,

Here goods include those things or items that are movable in a nature and also consist of manufactured goods that are specialized in nature

Therefore, as per the given situation, the bill downloaded an antivirus software so here the software is treated as a good

) 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?

Answers

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.

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.

Answers

TJ life was the way to get

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

You are writing a paragraph in a word processor. You
want to use the same text that appears elsewhere in a
different document, but you want to keep it in the other
document. To get the other text into the new document
most efficiently, you should:
Cut and paste
Ctrl + S
Copy and paste
Print the text and retype it so you don't make any mistakes.

Answers

Answer:

Explanation:

I mean I would copy and paste it. I hope thats right

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

Answers

Answer:

Fill with Color tool

In the lab, you defined the information systems security responsibility for each of the seven domains of a typical IT infrastructure. In which domain would you be most likely to secure access through the Internet and from employees’ homes?

Answers

Answer:

Remote Access Domain

Explanation:

Remote access Domain allows users to enter into system network through VPN.

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.

Answers

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.

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());

Answers

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

Two-factor authentication can best be breached by the adversary using:________. a. social engineering attack b. using sniffers like Wireshark and capturing packets c. using rootkits and privilege escalation to get to the kernel processes d. using a virus and destroying the computer that stores authentication information.

Answers

Answer:

a. social engineering attack

Explanation:

Two-factor authentication requires that the user/owner of the account enter a second verification code alongside their password in order to access the account. This code is usually sent to a personal phone number or email address. Therefore in order to breach such a security measure the best options is a social engineering attack. These are attacks that are accomplished through human interactions, using psychological manipulation in order to trick the victim into making a mistake or giving away that private information such as the verification code or access to the private email.

7d2b:00a9:a0c4:0000:a772:00fd:a523:0358 What is IPV6Address?

Answers

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

Answers

Answer:

B

Explanation:

all url's begin with https://

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.

Answers

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;

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

Answers

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.

Let K(x, y) denote the statement "x knows y" and D denote the domain of all people. Express the following English sentences as a quantified proposition using the definitions above:

1. Everybody knows somebody.
2. There is somebody that no one knows.
3. There is no one who knows everybody

Answers

Answer:

Given: K(x,y) denotes statement:

"x knows y"

D denote domain of all people.

Explanation:

1. Everybody knows somebody.

Solution:

∀x∈D ∃y∈D : K(x, y)

∀ means for all. Here it is used for Everybody.

∃ means there exists some. Here it represents Somebody.

∈ means belongs to . Both x and y belongs to the domain D of all people.

2. There is somebody that no one knows.

Solution:

∀x∈D ∃y∈D : ¬K(x, y)

∀ means for all. ∃ means there exists some. ∈ means belongs to both x and y belongs to the domain D of all people.¬ this is negation sign which means not K(x,y). So the negation of everybody knows somebody can be expressed as there is somebody that no one knows.

3. There is no one who knows everybody

Solution:

This can be represented in both the ways below.

∀ y∈D ∃ x∈D : K(x, y)

∀ means for all. ∃ means there exists some. ∈ means belongs to both x and y belongs to the domain D of all people.

∀x∈D ∀y∈D : ¬K(x, y)

∀ means for all. The negation shows that there is no one who knows everybody.

Write a function named file_stats that takes one string parameter (in_file) that is the name of an existing text file. The function file_stats should calculate three statistics about in_file i.e. the number of lines it contains, the number of words and the number of characters, and print the three statistics on separate lines.

For example, the following would be be correct input and output. (Hint: the number of characters may vary depending on what platform you are working.)
>>> file_stats('created_equal.txt')

lines 2
words 13
characters 72

Answers

Answer:

Here is the Python program.

characters = 0

words = 0

lines = 0

def file_stats(in_file):

   global lines, words, characters

   with open(in_file, 'r') as file:

       for line in file:

           lines = lines + 1

           totalwords = line.split()

           words = words + len(totalwords)

           for word in totalwords:

               characters= characters + len(word)

file_stats('created_equal.txt')

print("Number of lines: {0}".format(lines))

print("Number of words: {0}".format(words))

print("Number of chars: {0}".format(characters))

   

Explanation:

The program first initializes three variables to 0 which are: words, lines and characters.

The method file_stats() takes in_file as a parameter. in_file is the name of the existing text file.

In this method the keyword global is used to read and modify the variables words, lines and characters inside the function.

open() function is used to open the file. It has two parameters: file name and mode 'r' which represents the mode of the file to be opened. Here 'r' means the file is to be opened in read mode.

For loop is used which moves through each line in the text file and counts the number of lines by incrementing the line variable by 1, each time it reads the line.

split() function is used to split the each line string into a list. This split is stored in totalwords.

Next statement words = words + len(totalwords)  is used to find the number of words in the text file. When the lines are split in to a list then the length of each split is found by the len() function and added to the words variable in order to find the number of words in the text file.

Next, in order to find the number of characters, for loop is used. The loop moves through each word in the list totalwords and split each word in the totalwords list using split() method. This makes a list of each character in every word of the text file. This calculates the number of characters in each word. Each word split is added to the character and stored in character variable.

file_stats('created_equal.txt')  statement calls the file_stats() method and passes a file name of the text file created_equal.txt as an argument to this method. The last three print() statements display the number of lines, words and characters in the created_equal.txt text file.

The program along with its output is attached.

Other Questions
Simplify 7(A-6)A-67A-427A-6 what should be added in the polynomial x3-6x2+11x+8 so that it is completely divisible by 1-3x +x2 Match the terms to their definition.the number of individual organisms born into a population in a given yearthe movement of individuals out of a populationthe number of individual organisms that die in a population in a given yearthe movement of individuals into a population Which terms identify the role of Fe2+ in the body? Please help on this !!!!!!!!!!! Will mark brainliest answer !!!!!!!!! What do you consider to be the American Dream? According to the writing prompt, which writing format are you to use to complete the assignment?A personal narrativeB business letterCresearch paperD short story You are making bracelets to sell. Each bracelet has two different colors ofbeads. You have blue, silver, black, and purple beads. Which of thesestrategies would you be most likely to use in planning the different braceletsyou can sell?A. Find a pattern.B. Guess and check.C. Work backward.D. Make a list. An increase in capital is called using tje logarithm find the square of 86.46 What does the period number tell about the energy levels occupied by electrons in an atom? In October of 2012, Apple introduced a much smaller variant of the Apple iPad, known at the iPad Mini. Weighing less than 11 ounces, it was about 50% lighter than the standard iPad. Battery tests for the iPad Mini showed a mean life of 10.25 hours (The Wall Street Journal, October 31, 2012). Assume that battery life of the iPad Mini is uniformly distributed between 8.5 and 12 hours.a. Give a mathematical expression for the probability density function of battery life.b. What is the probability that the battery life for an iPad Mini will be 10 hours or less (to 4 decimals)?c. What is the probability that the battery life for an iPad Mini will be at least 11 hours (to 4 decimals)?d. What is the probability that the battery life for an iPad Mini will be between 9.5 and 11.5 hours (to 4 decimals)?e. In a shipment of 100 iPad Minis, how many should have a battery life of at least 9 hours (to nearest whole value)? A substance that is made up of more than one atom is called _____. What is the solution to log (10x-1)= logs(9x+ 7)?6O X=619O X=19X= 7X= 8 Solve the following system of equations using the elimination method. 5x 5y = 10 6x 4y = 4 Liam needs a guitar case. It must be 1.18 m long. Select the case that is suitable? 11.8mm,118cm,1.8m ,11.18mm does anyone know this? Please help! 100 points!What are some ways that the nitrogen cycle overlaps with or influences the oxygen and carbon cycles?Are any of these interactions between the cycles positive?Are any negative?What about when the nitrogen cycle is thrown off balance by the Haber-Bosch process and others like it?How can that influence the oxygen and carbon cycles?Are there other cycles involved that have not been mentioned in this question?What does this discussion suggest about the nature of the Earth as one large system? I need help with this last question Which statement most clearly focuses on the context of a writer's work?O A. Some of Shirley Jackson's most notable works are The Hauntingof Hill House and Come Along with Me.O B. Shirley Jackson's "The Lottery" is about the danger of sticking totraditions without properly examining them.O C. Although not religious, Shirley Jackson had a religious upbringingthat influenced the themes in much of her work.O D. In The Haunting of Hill House, Shirley Jackson explores the horrorthat can come about from people's relationships.