write a function that takes a string as parameter, return true if it’s a valid variable name, false otherwise. You can use keyword module’s iskeyword() to determine if a string is keyword.

Answers

Answer 1

Answer:

The solution code is written in Python 3:

import keyword   def checkValidVariable(string):    if(not keyword.iskeyword(string)):        return True      else:        return False   print(checkValidVariable("ABC")) print(checkValidVariable("assert"))

Explanation:

Firstly, we need to import keyword module so that we can use its iskeyword method to check if a string is registered as Python keyword (Line 1).

Next, we create a function checkValidVariable that takes one input string (Line 3). Within the function body, we use iskeyword method to check if the input string is keyword. Please note the "not" operator is used here. So, if iskeyword return True, the True value will be turned to False by the "not" operator or vice versa (Line 4-5).

We test the function by passing two input string (Line 9-10) and we shall get the sample output as follows:

True

False


Related Questions

Print "Censored" if userInput contains the word "darn", else print userInput. End with newline. Ex: If userInput is "That darn cat.", then output is:CensoredEx: If userInput is "Dang, that was scary!", then output is:Dang, that was scary!Note: If the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "Program end never reached." The system doesn't print the test case that caused the reported message.#include #include using namespace std;int main() {string userInput;getline(cin, userInput);int isPresent = userInput.find("darn");if (isPresent > 0){cout << "Censored" << endl; /* Your solution goes here */return 0;}

Answers

Answer:

#include <string>

#include <iostream>

using namespace std;

int main() {

string userInput;

getline(cin, userInput);

// Here, an integer variable is declared to find that the user entered string consist of word darn or not

int isPresent = userInput.find("darn");

if (isPresent > 0){

cout << "Censored" << endl;

// Solution starts here

else

{

cout << userInput << endl;

}

// End of solution

return 0;

}

// End of Program

The proposed solution added an else statement to the code

This will enable the program to print the userInput if userInput doesn't contain the word darn

2. Imagine that the user at computer A wants to open a file that is on computer C's hard disk, in a peer-to-peer fashion. What path do you think data would take between these two computers?

Answers

Answer:

Since there is no server in a peer-to-peer network, both computers will share resources through the network component used in linking them together such as a cable or a switch.

Explanation:

In its simplest form, a peer-to-peer (P2P) network is created when two or more computers (in this case computer A and C) are connected and share resources without going through a separate server computer. A P2P network can be an ad hoc connection—a couple of computers connected via a Universal Serial Bus to transfer files or through an Ethernet cable. A P2P network also can be a permanent infrastructure that links a half-dozen computers in a small office over copper wires using switches as a central connector. Or a P2P network can be a network on a much grander scale in which special protocols and applications set up direct relationships among users over the Internet.

Please find attached the diagram of the peer-to-peer network of the two computers, computer A and computer. We have two network connections in the diagram.

The first one was implemented using a crossover Ethernet cable to connect both computers through the RJ45 LAN port on their network interface card.

In this network configuration, that will go through the NIC card from Computer C, through the cable to the NIC on computer A and vice versa.

In the second implementation, we used a switch to connect both computers using a straight Ethernet cable.

In this connection, data will go through the NIC card in computer C, through the cable connecting Computer C to the switch, through the switch, then through the cable connecting the switch to computer A and finally through the NIC card on computer A and vice versa

Which features would work well for text entered into cells? Check all that apply.
thesaurus
spelling
autosum
average
find
replace​

Answers

Answer:

A B E F

Explanation:

Answer:

The correct answer is A,B,E,F

Explanation:

but u should give top guy brainliest

In the sub-module on relations, we discussed total orders. Total orders allow you to sort the elements in a list. Why is sorting such an important operation in computing?

Answers

Answer:

The correct answer to the following question will be Option "b" and "d".

Explanation:

The given question is incomplete, options are missing. The complete question is :

(a) A ordered program runs more efficiently.

(b) Queries or claims move faster.

(c) There's less risk the data will be lost.

(d) Although printing out a text is readable.

Now,

Sorting involves organizing the information or data in the sequence to have assented or descending. It's any process that involves organizing the data in such a logical addition to being able to comprehend, understand, interpret or imagine.

Usually, data is ordered in either increasing or decreasing direction which is based on objective numbers or counts but may also be categorized based on the descriptions of the component standards.

So, it's the right answer.

Digital subscriber lines: are very-high-speed data lines typically leased from long-distance telephone companies. are assigned to every computer on the Internet. operate over existing telephone lines to carry voice, data, and video. have up to twenty-four 64-Kbps channels. operate over coaxial cable lines to deliver Internet access.

Answers

Answer: Operate over existing telephone lines to carry voice, data, and video.

Explanation:

Digital subscriber line is a means of transferring high bandwidth data over a telephone line. Such data could be a voice call, graphics or video conferencing. DSL uses a user's existing land lines in a subscriber's home, allowing users to talk on a telephone line while also being connected to the Internet. In most cases, the DSL speed is a function of the distance between a user and a central station. The closer the station, the better its connectivity.

The purpose of this programming project is to demonstrate a significant culmination of most constructs learned thus far in the course. This includes Lists, Classes, accessors, mutators, constructors, implementation of Comparable, Comparator, use of Collections sort, iterators, properly accessing fields of complex objects, and fundamental File I/O.

You will create a LinkedList of Word objects using all the words found in the input file words.txt. A Word object contains 2 String fields; 1 to store a word in its normal form and the other to store a word in its canonical form. The canonical form stores a word with its letters in alphabetical order, e.g. bob would be bbo, cat would be act, program would be agmoprr, and so on. The class Word constructor has the responsibility of storing the normal form of the word in the normal form field and converting the normal form into the canonical form which is stored in the canonical form field (you should call a separate method for this conversion purpose).

Once all the words from the input file have been properly stored in a LinkedList of Word, you should use Collections to sort this list ascending alphabetically based on the canonical words by making the Word class Comparable.

Using an Iterator on the LinkedList of Word, create a 2nd list (new LinkedList) consisting of objects of a new class named AnagramFamily. AnagramFamily should contain at least 2 fields; 1 to hold a list of "Word" words that are all anagrams of each other (these should all be grouped together in the original canonical sorted list), and the 2nd field to store an integer value of how many items are in the current list. (Keep in mind, because the original list contains both the normal and canonical forms, as the AnagramFamily List will also have, a family of anagrams will all have the same canonical form with different normal forms stored in the normalForm field of the Word class). Each AnagramFamily List of Word should be sorted Descending by normal form using a Comparator of Word (if you insert Word(s) into a family one at a time, this presents an issue on how to get this list sorted as each Word insertion will require a new sort to be performed to guarantee the list is always sorted. For this reason it is best to form a list, sort it, and then create an AnagramFamily by passing the sorted list to it).

Sort the AnagramFamily LinkedList in descending order based on family size by use of a Comparator to be passed to the Collections sort method.

Next, output the top five largest families then, all families of length 8, and lastly, the very last family stored in the list to a file named "out6.txt." Be sure to format the output to be very clear and meaningful.

Finally, the first 4 people to complete the assignment should post their output results to the Canvas discussion forum for the remaining students to see the correct answer.

Be sure to instantiate new objects whenever transferring data from one object to another. Also, be sure to include various methods for manipulation and access of fields as well as helper methods to reduce code in main, such as the input/output of file data (like all other assignments, you will be graded on decomposition, i.e. main should not contain too many lines of code).

Part of your grade will depend on time. If written correctly (use of iterators and care taken when creating the anagram families), the running time should be less than 3 seconds. Programs that take longer will lose points based on the time. As encouragement to consider all options for speed, programs taking 1 minute will receive a 40 point deduction. Any longer than 3 minutes will receive only minimal points (10) for effort.

Though the basic algorithms involved are straight forward enough, there is a great deal of complexity involved with various levels of access to specific data. As mentioned before and never so importantly as with this assignment, start early and set a goal for completion by this weekend. Trust me, this is sound advice.

As a reminder, you will create at least 5 files: the driver, Word class, AnagramFamily class, and 2 comparators: 1 to compare Word objects for sorting descending based on the normal form of Word objects and 1 to compare AnagramFamily sizes for a descending sort.

Answers

Answer:

Java program explained below

Explanation:

here is your files : ----------------------

Word.java : --------------

import java.util.*;

public class Word implements Comparable<Word>{

private String normal;

private String canonical;

public Word(){

 normal = "";

 canonical = "";

}

public Word(String norm){

 setNormal(norm);

}

public void setNormal(String norm){

 normal = norm;

 char[] arr = norm.toCharArray();

 Arrays.sort(arr);

 canonical = new String(arr);

}

public String getNormal(){

 return normal;

}

public String getCanonical(){

 return canonical;

}

public int compareTo(Word word){

 return canonical.compareTo(word.getCanonical());

}

public String toString(){

 return "("+normal+", "+canonical+")";

}

}

AnagramFamily.java : ------------------------------

import java.util.*;

public class AnagramFamily implements Comparable<AnagramFamily>{

private LinkedList<Word> words;

private int size;

private class WordComp implements Comparator{

 public int compare(Object o1,Object o2){

  Word w1 = (Word)o1;

  Word w2 = (Word)o2;

  return w2.getNormal().compareTo(w1.getNormal());

 }

}

public AnagramFamily(){

 words = new LinkedList<>();

 size = 0;

}

public LinkedList<Word> getAnagrams(){

 return words;

}

public void addAnagram(Word word){

 words.add(word);

 size++;

}

public void sort(){

 Collections.sort(words,new WordComp());

}

public int getSize(){

 return size;

}

public int compareTo(AnagramFamily anag){

 Integer i1 = new Integer(size);

 Integer i2 = new Integer(anag.getSize());

 return i2.compareTo(i1);

}

public String toString(){

 return "{ Anagrams Family Size : "+size+" "+words.toString()+"}";

}

}

WordMain.java : ------------------------------

import java.util.*;

import java.io.File;

import java.io.PrintWriter;

public class WordMain{

public static void readFile(LinkedList<Word> words){

 try{

  Scanner sc = new Scanner(new File("words.txt"));

  while(sc.hasNext()){

   words.add(new Word(sc.next()));

  }

  sc.close();

 }catch(Exception e){

  e.printStackTrace();

  System.exit(-1);

 }

}

public static void findAnagrams(LinkedList<AnagramFamily> anagrams,LinkedList<Word> words){

 Iterator<Word> itr = words.iterator();

 while(itr.hasNext()){

  Iterator<AnagramFamily> aitr = anagrams.iterator();

  Word temp = itr.next();

  System.out.println(temp);

  boolean st = true;

  while(aitr.hasNext()){

   AnagramFamily anag = aitr.next();

   Iterator<Word> anags = anag.getAnagrams().iterator();

   while(anags.hasNext()){

    Word t1 = anags.next();

    if(t1.compareTo(temp) == 0 && !t1.getNormal().equals(temp.getNormal())){

     anag.addAnagram(temp);

     st = false;

     break;

    }

   }

   anag.sort();

  }

  if(st){

   AnagramFamily anag = new AnagramFamily();

   anag.addAnagram(temp);

   anagrams.add(anag);

   System.out.println(anag);

  }

 }

}

public static void writeOutput(LinkedList<AnagramFamily> anagrams){

 try{

  PrintWriter pw = new PrintWriter(new File("out6.txt"));

  Collections.sort(anagrams);

  int i = 0;

  Iterator<AnagramFamily> aitr = anagrams.iterator();

  while(i < 5 && aitr.hasNext()){

   AnagramFamily anag = aitr.next();

   anag.sort();

   pw.println(anag);

   i++;

  }

  aitr = anagrams.iterator();

  pw.println("\n\nAnagramsFamily size 8 datas : ");

  while(aitr.hasNext()){

   AnagramFamily anag = aitr.next();

   anag.sort();

   if(anag.getSize() == 8){

    pw.println(anag);

   }

  }

  pw.close();

 }catch(Exception e){

  e.printStackTrace();

  System.exit(-1);

 }

}

public static void main(String[] args) {

 LinkedList<Word> words = new LinkedList<>();

 readFile(words);

 Collections.sort(words);

 //System.out.println(words.toString());

 LinkedList<AnagramFamily> anagrams = new LinkedList<>();

 findAnagrams(anagrams,words);

 //System.out.println(anagrams.toString());

 writeOutput(anagrams);

}

}

I claim that in most situations if you can solve the decision problem in polynomial time then you can solve the optimization problem in polynomial time. Prove that this is true for the CLIQUE problem.

Answers

Answer:

Yes CLIQUE has decision problem as

Input: G (V.E.) and number k

Output : There is set of vertices in U and edge in E

The clique decision problem is NP - complete where clique is a fixed parameter and hard to approximate. In clique, all maximal clique listed.

Explanation:

In the computer, the CLIQUE is the computational problem of finding the cliques in subsets of vertices, all sides in a graph. It depending on cliques in which information should be found.

A clique has an edge in connecting the vertices; An edge connects only two vertices. For example, if you want to connect two vertices, then two edges need if you want three, then three edges need.

The clique problem is finding the clique in adjacent to each other in a graph. Its decision problem is NP-complete.

In computer science, a decision problem is a problem that posed yes or no of the input values. In computational and computability theory. it is a method used for solving a decision problem that is called the decision procedure of the problem.

write a program that reads an integer and displays, using asterisks a filled and hollow square, placed next to each other. for example if side length is 5 the program should display like so.



This program prints a filled and hollow square.
Enter the length of a side: 5
***** *****
***** * *
***** * *
***** * *
***** *****

Answers

Final answer:

A Python program can be written to read an integer that is then used to print out two squares of that side length with asterisks, one filled and one hollow. The provided Python code uses nested loops and conditionals to generate the squares accurately.

Explanation:

To complete your request, we would need to write a program to read an integer input and utilize this integer value to generate two squares with asterisks, one filled and one hollow. Here is a simple Python program:

def print_squares(n):
# Full square
for i in range(n):
 for j in range(n):
  print('*', end=' ')
 print()

# New line between squares
print()

# Hollow square
for i in range(n):
 for j in range(n):
  if i==0 or i==n-1 or j==0 or j==n-1:
   print('*', end=' ')
  else:
   print(' ', end=' ')
 print()

# Run the function
print_squares(int(input('Enter the length of a side: ')))

This program first prints a filled square and a hollow square using conditionals to distinguish between the edge and inner positions of the squares.

Learn more about Python programming here:

https://brainly.com/question/33469770

#SPJ3

In this lab, you add nested loops to a Java program provided.
The program should print the letter E. The letter E is printed using asterisks, three across and five down. Note that this program uses System.out.print("*"); to print an asterisk without a new line.
Instructions:
Write the nested loops to control the number of rows and the number of columns that make up the letter E.
In the loop body, use a nested if statement to decide when to print an asterisk and when to print a space. The output statements have been written, but you must decide when and where to use them.
Execute the program. Observe your output.
Modify the program to change the number of rows from five to seven and the number of columns from three to five.
What does the letter E look like now?

Answers

Answer:

/Create a class LetterE.

public class LetterE

{

//Define the main() function.

public static void main(String args[])

{

//Declare the variables.

final int NUM_ACROSS = 3;

final int NUM_DOWN = 5;

int row;

int column;

//Begin the for loop.

for(int k=1; k<=NUM_DOWN; k++)

{

//Begin the for loop.

for(int l=1; l<=NUM_ACROSS; l++)

{

//Check the condition.

if(k == 1 || k==5 || k == 3)

//Display the asterisk.

System.out.print("*");

// Decide when to print asterisk in column 1.

else if(l==1)

//Display the asterisk.

System.out.print("*");

//Else part of above if .

else

//Display the space.

System.out.print(" ");

}//End of for loop.

//Statement for the next line.

System.out.println();

}//End of for loop.

//End of the workdone.

System.exit(0);

}//End of the main() function.

}//End of the LetterE class.

Explanation:

Final answer:

To create the letter E using asterisks, use nested loops in your Java program. Modify the program by changing the number of rows and columns for a different representation of the letter E.

Explanation:

To create the letter E using asterisks, you will need to use nested loops in your Java program. The outer loop will control the number of rows, and the inner loop will control the number of columns. Within the loop body, you can use a nested if statement to decide when to print an asterisk and when to print a space. Here's an example of how the nested loops can be implemented:

for (int row = 1; row <= 5; row++) {
 for (int col = 1; col <= 3; col++) {
   if (col == 1 || (row == 1 || row == 3 || row == 5)) {
     System.out.print("*");
   } else {
     System.out.print(" ");
   }
 }
 System.out.println();
}

When you modify the program to change the number of rows to seven and the number of columns to five, the letter E will look different. It will have seven rows and five columns, resulting in a larger representation of the letter E.

What subnet mask or CIDR notation would be required to maximize the host counts while still meeting the following requirements: 192.168.228.0 255.255.255.128 Required Networks: 2 Required Hosts: 20

Answers

Answer:

192.168.228.0 255.255.255.224

Explanation:

192.168.228.0 255.255.255.128

subnet mask: defines the host and the network part of a ip

CIDR notation : is the shortened form for subnet mask that uses the number of host bits for defining the host and the network part of a ip

For example: 192.168.228.0 255.255.255.128 has CIDR equivalent of 192.168.228.0\25

To have atleast 20 hosts

20 ≤ (2^x) -2

x ≈5

with 5 host bits, we have 2^5-2 = 30 hosts per subnet

and 2^3 = 8 subnets

To get the subnet mask, we have 3 network bits

1110000 to base 10 = 2^7 + 2^6 +2^5= 224

192.168.228.0 255.255.255.224

. Identify an emerging crime issue in your community using data available from sources such as local newspapers, online police reporting, and so forth. Frame the situation, and then identify the restraining and driving forces that may be impacting the issue. 2. Using your force field analysis, develop a cause and effect diagram for the situation.

Answers

A crime problem in my community is related to cell phone theft. According to the local newspaper, it is estimated that in my city about 10 cell phones are stolen per week. Still according to the local newspaper, most of these robberies occur in the city center and in the periphery, with women being the biggest victims.

Although the police have shown themselves to be a restraining force on this type of crime, few arrests have been made successfully, mainly for the negligence of the victims in providing a complaints.

The main driving force behind this crime is drug trafficking. Most burglars steal cell phones to sell them and have money to buy drugs. This is totally related to the government's neglect to promote quality education in the city, allowing several children and young people to stay on the street and run the risk of becoming involved in the traffic.

A cause and effect diagram for this situation is:

Irresponsible government ---> poor quality education ---> children and adolescents on the streets ---> involvement in drug trafficking ---> theft of cell phones ----> frightened population --->  lack of complaints ----> criminals on the street.

"Using the printf method, print the values of the integer variables bottles and cans so that the output looks like this: Bottles: 8 Cans: 24 The numbers to the right should line up. (You may assume that the numbers have at most 8 digits.)"

Answers

Use printf with format specifiers %-8d to print the integer variables bottles and cans left-justified in a field of 8 characters, to align the numbers as requested.

To print the values of the integer variables bottles and cans with the output aligned as specified using printf, you can use the following printf statement in your code:

printf("Bottles: %-8d Cans: %-8d\n", bottles, cans);

The %-8d format specifier is used for both integers. This means the integer will be left-justified in a field of at least 8 characters wide, which ensures that the numbers will be aligned. The hyphen (-) is used for left-justification, and the number 8 specifies the minimum width of the field.

Write code that prints: Ready! numVal ... 2 1 Start! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: numVal = 3 outputs: Ready! 3 2 1 Start!

Answers

Answer:

Code to this question can be described as follows:

Program:

#include <iostream> //defining header file

using namespace std;

int main() //defining main method

{

int n1,j,x1=0; //defining integer variable

cout<<"Enter a number: "; //print message

cin>>n1; //input value from the user

cout<<n1<<endl; //print input value

for(j=1;j<n1;j++)  //loop to count reverse number

{

x1=n1-j; //calculate value

cout<<x1<<endl;  //print value

}

return 0;

}

Output:

Enter a number: 3

3

2

1

Explanation:

In the above C++ language program, three integer variable "n1,j and x1" is declared, in which variable n1 take input from the user end and the variable j and x1 are used in the loop to calculate the value in the reverse order. In the next step, a for loop is declared, in which the variable x1 calculates the value in reverse order and uses a print method to print its value.  

What moderation capabilities does Salesforce communities provide to automate the process ofidentifying and replacing words that are offensive or inappropriate for the Community?
A. Enable Moderation for the Community to block offensive or inappropriate content.
B. Use moderation rules in the Community to block offensive or inappropriate content.
C. Create Process flows to identify posts with the offensive or inappropriate words and replace withother content.
D. Write a trigger to identify posts with the offensive or inappropriate words and replace with othercontent.

Answers

Answer:

a is the answer

Explanation:

Answer:

D. Is the correct answer i think

Explanation:

Bob received a message from Alice which she signed using a digital signature. Which key does Bob use to verify the signature?Group of answer choicesAlice's private keyBob's public keyAlice's public keyBob's private key

Answers

Answer:

Alice's public key

Explanation:A Public key is a key that can be used for verifying digital signatures generated using a corresponding private key which must have been sent to the user by the owner of the digital signature.

Public keys are made available to everyone required and they made up of long random numbers.

A digital signature signed with a person's private key can only be verified using the person's private key.

Write a while loop that prints userNum divided by 4 (integer division) until reaching 2. Follow each number by a space. Example output for userNum = 160:

40 10 2

Note: These activities may test code with different test values. This activity will perform four tests, with userNum = 160, then with userNum = 8, then with userNum = 0, then with userNum = -1. See "How to Use zyBooks".

Also note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds, and report "Programend never reached." The system doesn't print the test case that caused the reported message.

#include
using namespace std;

int main() {
int userNum;

cin >> userNum;

/* Your solution goes here */

cout << endl;

return 0;
}

Answers

Final answer:

The solution requires creating a while loop in C++ that divides a number by 4 using integer division and prints each result until the number is less than or equal to 2.

Explanation:

To write a while loop in C++ that prints userNum divided by 4 until reaching 2, you can follow the given instructions to modify the provided code snippet. The loop should include integer division and check the condition if the current userNum is greater than 2. Here's the complete detailed code inside the main function:

#include
using namespace std;

int main() {
 int userNum;
 cin >> userNum;
 while (userNum > 2) { // Loop continues as long as userNum is greater than 2
   userNum = userNum / 4; // Integer division by 4
   cout << userNum << " "; // Printing the result followed by a space
 }
 cout << endl;
 return 0;
}

This loop will continue to execute, reducing userNum with integer division by 4, until userNum becomes less than or equal to 2. After the loop, the program will print a newline character and terminate.

Final answer:

A while loop in C++ is used to perform integer division of a user input by 4 until the value drops below or equal to 2, only printing values above 2.

Explanation:

You have been asked to write a while loop in C++ that continues to print the variable userNum divided by 4, using integer division, until the result reaches 2. Below is an example code snippet that accomplishes this task:

#include
using namespace std;
int main() {
   int userNum;
   cin >> userNum;
   while (userNum > 2) {
       userNum = userNum / 4;
       if (userNum < 2) {
           break;
       }
       cout << userNum << " ";
   }
   cout << endl;
   return 0;
}

Please note that the loop includes a check to prevent printing numbers less than 2 and ends the loop using a break statement if userNum becomes less than 2 after the division.

Suppose there are two ISPs providing WiFi service in a café. Each ISP operates its own AP and has its own IP address block. If by chance both ISPs configure their APs to operate over the same channel, e.g channel 5, how will users who attempt to connect to either of the APs be affected?

Answers

Users trying to connect to APs set on the same Wi-Fi channel will likely face interference, resulting in connection instability and reduced performance. Such channel overlap can mimic a Denial of Service, slowing down or disrupting network access.

If two Internet Service Providers (ISPs) configure their Access Points (APs) to operate on the same Wi-Fi channel, such as channel 5, the users trying to connect to either AP may experience interference and degradation in Wi-Fi quality. This interference can cause a Denial of Service (DoS) effect, where users may face difficulty establishing a stable connection due to heavy traffic on the same channel. Signals may overlap, which leads to signal contention, slower speeds, increased latency, and potentially dropped connections. It is similar to when a microwave oven causes interference with a Wi-Fi system, as both are emitting signals in a similar frequency range.

If the channel congestion is severe, it can feel akin to a DoS attack in which the AP is overwhelmed, preventing legitimate users from gaining or maintaining a smooth connection. To mitigate such issues, APs should be set to operate on different channels, or technologies like connection manager software and mobile Virtual Private Networks (VPNs) can be leveraged for a more stable experience.

• Write a program that asks the user to enter a number of seconds. • If there are less than 60 seconds input, then the program should display the number of seconds that was input. • There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number of minutes in that many seconds (note that ther

Answers

Answer:

The solution code is written in Python:

sec = int(input("Enter number of seconds: ")) if(sec >=60):    min = sec // 60    sec = sec % 60 else:    min = 0 print(str(min) + " minutes " + str(sec) + " seconds")

Explanation:

Firstly, use input function to prompt user to enter number of seconds and assign the input value to variable sec (Line 1).

Next, create an if statement to check if the sec is bigger or equal to 60 (Line 3). If so, we user // operator to get minutes and use % operator to get the seconds (Line 4 - 5).

Then we use print function to print the minutes and seconds (Line 9).

Answer:

Here is the program in C++. Let me know if you want this program in some other programming language.

#include <iostream> //for input output functions

using namespace std;//to detect objects like cin cout

int main()//start of main() function body

{  int seconds; // stores the value of seconds

   int time;    // stores value to compute minutes hours and days

   cout << "Enter a number of seconds: ";

//prompts user to enter number of seconds

   cin >> seconds; // reads the value of seconds input by user

   if (seconds <= 59) //if the value of seconds is less than or equal to 59

   { cout << seconds<<" seconds\n";    } //displays seconds

   else if (seconds >= 60 && seconds < 3600)

//if value of seconds is greater than or equal to 60 and less than 3600

   {  time = seconds / 60; //computes minutes

       cout << time << " minutes in "<<seconds<<" seconds \n ";    }

//displays time in minutes

   else if (seconds >= 3600 && seconds < 86400)    {

//if input value of secs is greater than or equal to 3600 and less than 85400

       time = seconds / 3600; //calculate hours in input seconds

       cout << time << " hours in "<<seconds<<" seconds \n";   }

//displays the time in hours

   else if (seconds >= 86400)    { //if seconds is greater or equal to 86400

       time = seconds / 86400; //compute the days

       cout << time << " days in  "<<seconds<<" seconds \n";   } }

//displays the number of days in input number of seconds

Explanation:

This program first prompts the user to enter the time in seconds and computes the number of minutes, hour or days according to the conditions specified in the program. If the value of seconds entered by the user is less than or equal to 59, the number of seconds are displayed as output, otherwise the if and else if conditions are checked if the input value of seconds is greater than 60 to compute the corresponding minutes, hours or days. Everything is explained within the comments in the program.You can change the data type of time variable from int to float to get the value floating point numbers. Here i am using int to round the time values. The screenshot of the output is attached.

Write code that prints: Ready! countNum ... 2 1 Blastoff! Your code should contain a for loop. Print a newline after each number and after each line of text Ex: countNum = 3 outputs: Ready! 3 2 1 Blastoff!

Answers

Final answer:

The question involves writing a Python code that uses a for loop to print a countdown from a specified number to 1 followed by "Blastoff!". The code utilizes the range function to generate the countdown sequence for the loop.

Explanation:

To create a Python program that counts down from a given number to one and then prints "Blastoff!", you can use a for loop. Here is an example code snippet that accomplishes this task:

countNum = 3
print("Ready!")
for i in range(countNum, 0, -1):
   print(i)
print("Blastoff!")

The range function generates a sequence of numbers starting from countNum down to 1, and the for loop iterates over this sequence. After the loop finishes, it prints "Blastoff!" ensuring a newline is printed after each iteration and after the last line of text.

A critical activity is________________.a. an activity that consumes no time but shows precedence between events. b. a milestone accomplishment within the project. c. an activity with zero slack. d/ the beginning of an event.

Answers

Answer:

C

Explanation:

Critical activity is the sequential activities from beginning to the end of a project. A lot of projects have a single critical path, although some projects may have more than one critical activity which depends on the flow logic utilized in the project.

Define an iterative function named alternate_i; it is passed two linked lists (ll1 and ll2) as arguments. It returns a reference to the front of a linked list that alternates the LNs from ll1 and ll2,

Answers

Answer:

answer is attached

The problem requires the definition of an iterative function called alternate_i that takes two linked lists, ll1 and ll2, as arguments. This function should return a reference to the front of a linked list that alternates the elements from ll1 and ll2.

The problem requires the definition of an iterative function called alternate_i that takes two linked lists, ll1 and ll2, as arguments. This function should return a reference to the front of a linked list that alternates the elements from ll1 and ll2.

To solve this problem, you can create a new linked list and iterate through both ll1 and ll2 simultaneously, adding elements alternately. If either linked list becomes empty, you can append the remaining elements from the other linked list.

Here is a possible implementation:

def alternate_i(ll1, ll2):
   result = None
   current = None
   
   while ll1 is not None and ll2 is not None:
       if result is None:
           result = current = LN(ll1.value)
       else:
           current.next = LN(ll1.value)
           current = current.next
       
       current.next = LN(ll2.value)
       current = current.next
       
       ll1 = ll1.next
       ll2 = ll2.next
   
   if ll1 is not None:
       current.next = ll1
   elif ll2 is not None:
       current.next = ll2
   
   return resultThe Question is:Define an iterative function named alternate_i;it is passed two linked lists (ll1 and ll2) as arguments. It returns a reference to the front of a linked list that alternates the LNs from ll1 and ll2, starting with ll1;if either linked list becomes empty, the rest of the LNs come from the other linked list. So, all LNs in ll1 and ll2 appear in the returned result (in the same relative order, possibly separated by values from the other linked list).The original linked lists are mutated by this function (the .nexts are changed; create no new LN objects).For example, if we defined a = list_to_ll(['a', 'b', 'c',]) and b = list_to_ll([1,2,3,4,5]) alternate_i(a,b) returns a->1->b->2->c->3->4->5->None and alternate_i(b,a) returns 1->a->2->b->3- >c->4->5->None. You may not create/use any Python data structures in your code: use linked list processing only. Change only .next attributes (not .value attributes).class LN:def __init__(self,value,next=None):self.value = valueself.next = nextdef list_to_ll(l):if l == []:return Nonefront = rear = LN(l[0])for v in l[1:]:rear.next = LN(v)rear = rear.nextreturn frontdef str_ll(ll):answer = ''while ll != None:answer += str(ll.value)+'->'ll = ll.nextreturn answer + 'None'

Which of the following statement is true for Service Request Floods A. An attacker or group of zombies attempts to exhaust server resources by setting up and tearing down TCP connections B. It attacks the servers with a high rate of connections from a valid source C. It initiates a request for a single connection

Answers

Answer:

"Option A and Option B" is the correct answer.

Explanation:

It is a form of attack, that is usually used by breaching huge amounts of transport, that open up the network instead of a service. It is a large- server through the valid source, that tries to steal server resources of a group of cyborgs by establishing and disconnecting the link. That's why options A and B are correct.

In option C, It doesn't initiate a single call, if the intruder must first create and delete TCP connections as the servers become underfunded for authorized source links.

Write a Python function that takes as input parameters base_cost (a float) and customer_type and prints a message with information about the total amount owed and how much the tip was. You may recognize this program from HW1. We'll write a very similar program, just modifying it and using string formatting. Feel free to copy/paste code from before and modify it. As a reminder, the tip amounts are 10%, 15% and 20% for stingy, regular, and generous customers. And the tax amount should be 7%. The total amount is calculated as the sum of two amounts: check_amount = base_cost*1.07 tip_amount = tip_percentage*check_amount To receive full credit, you must use string formatting to print out the result from your function, and your amounts owed should display only 2 decimal places (as in the examples below). To "pretty print" the float to a desired precision, you will need to use this format operator (refer back to class slides for more explanation): %.2f Print the results to the console like in the example below, including the base cost of the meal, tax, three tip levels, and total for regular customers. Test cases: inputs: check_amount = 20, customer_type = "regular" --> output: Total owed by regular customer = $24.61 (with $3.21 tip) inputs: check_amount = 26.99, customer_type = "generous" --> output: Total owed by generous customer = $34.66 (with $5.78 tip) inputs: check_amount = 26.99, customer_type = "generous" --> output: Total owed by stingy customer = $16.83 (with $1.53 tip)

Answers

Answer:

Explanation:

Thanks for the question, here is the code in python

The 3rd example given in question is incorrect

inputs: check_amount = 26.99, customer_type = "generous" --> output: Total owed by stingy customer = $16.83 (with $1.53 tip)

the customer type in the above passed is generous but why the output is showing for stingy, I think this is incorrect

Here is the function, I have given explanatory names so that you can follow the code precisely and also used pretty formatting.

thank you !

===================================================================

def print_tip(base_cost, customer_type):

   TAX_PERCENTAGE = 1.07

   STINGY_PERCENTAGE = 0.1

   REGULAR_PERCENTAGE = 0.15

   GENEROUS_PERCENTAGE = 0.20

   check_amount = base_cost * TAX_PERCENTAGE

   tip_amount = 0.0

   if customer_type == 'regular':

       tip_amount = check_amount * REGULAR_PERCENTAGE

   elif customer_type == 'generous':

       tip_amount = check_amount * GENEROUS_PERCENTAGE

   elif customer_type == 'stingy':

       tip_amount = base_cost * STINGY_PERCENTAGE

   total_amount = tip_amount + check_amount

   print('Total owed by {} customer = ${} (with ${} tip)'.format(customer_type, '%.2f' % total_amount,'%.2f' % tip_amount))

print_tip(20, 'regular')

print_tip(26.99, 'generous')

print_tip(14.99, 'stingy')

In last week's meeting we discussed long and short term costs associated with build an buy scenarios using a house as an example. Take the same concepts and apply them to a software development project scenario. ie building a custom application for the business house versus buying that application and implementing it. Respond here and list out the criteria you would review to consider the decision.....labor costs long and short term, support costs etc.

Answers

Answer:

Custom software designs a software package that is targeted to a particular user community and that meets an organization's specific needs. A lot of these things must be taken into account whenever making a "buy vs. create" decision for a custom software.

Purchasing a wrong program may hinder the process for your business while trying to build one can be expensive and time consuming. The study of these two methods should take into account labor costs, long-term and brief-term costs, and infrastructure costs.

The most popular purpose an organization creates or gets a custom product is that it's special to their organization and if the software is designed effectively it will improve the business' productivity and create its own competitiveness edge.

Moreover, creating a custom software requires a great upfront cost and it also takes a long time to build a proper one.

Labor costs for developing a customized product are often greater than purchasing off-the-shelf solution, as the company has to employ a software developer and build an IT team to create and manage the right software.

There would be maintenance costs in the long run but it wouldn't be as enormous as it was in the building and the process of creation. But, the more significant than cost, is the long-term benefit it brings to the business.

A specific application will improve the workflow of the company, allow the company to retain space with the rate and volume expansion, all of which would help bring financial benefits and distinguish the business from other competitors.

Write a program that determines the commission for a sales person's weekly sales. The program will first ask for a sales person's name and then for sales for each day of the week (M-Su)! Then the total will be printed along with the commission. The commission is set at 10%.

Answers

Answer:

# The user is prompt to enter name

name = str(input("Enter the name: "))

# the user is prompt to enter monday sale

mon = int(input("Enter Monday sales: "))

# the user is prompt to enter tuesday sale

tue = int(input("Enter Tuesday sales: "))

# the user is prompt to enter wednesday sales

wed = int(input("Enter Wednesday sales: "))

# the user is prompt to enter thursday sales

thurs = int(input("Enter Thursday sales: "))

# the user is prompt to enter friday sales

fri = int(input("Enter Friday sales: "))

# the user is prompt to enter saturday sales

sat = int(input("Enter Saturday sales: "))

# the user is prompt to enter sunday sales

sun = int(input("Enter Sunday sales: "))

# the total is calculated

total = mon + tue + wed + thurs + fri + sat + sun

# the commission is calculated

commission = (10 * total) / 100

# the total is displayed

print(name, "your total is: ", total)

# the commission is displayed

print(name, "your commission is: ", commission)

Explanation:

The program is written in Python. And the program is well-commented.

Answer:

Find the python script below. Copy and paste directly into your python interpreter. Attached is  also the formatting

Explanation:

def check_number(a):    

   flag = True

   try:

       int(a)

   except ValueError:

       try:

           float(a)

       except ValueError:

           flag = False

           print("wrong input!")

           

   return(flag)

print("Welcome To Weekly Commission Calculator")

name = input("Input your name please and press enter:  ")

check = False

while(check==False):

   day1 = input ("Enter the sales for day 1 and press enter: ")

   check = check_number(day1)  

   continue

check = False

while(check==False):

   day2 = input ("Enter the sales for day 2 and press enter: ")

   check = check_number(day2)  

   continue

check = False

while(check==False):

   day3 = input ("Enter the sales for day 3 and press enter: ")

   check = check_number(day3)  

   continue

check = False

while(check==False):

   day4 = input ("Enter the sales for day 4 and press enter: ")

   check = check_number(day4)  

   continue

check = False

while(check==False):

   day5 = input ("Enter the sales for day 5 and press enter: ")

   check = check_number(day5)  

   continue

check = False

while(check==False):

   day6 = input ("Enter the sales for day 6 and press enter: ")

   check = check_number(day6)  

   continue

check = False

while(check==False):

   day7 = input ("Enter the sales for day 7 and press enter: ")

   check = check_number(day7)  

   continue

Total_sales = float(day1)+float(day2)+float(day3)+float(day4)+float(day5)+float(day6)+float(day7)

#rate = 10%  

rate = 0.1

#commission = rate * Total sales

Commission = rate * Total_sales

print("Total sales is " ,Total_sales)

#print("%s is %d years old." % (name, age))

print("Total sales for %s is $%d and the commission is $%e." % (name, Total_sales,Commission))

Design a database to keep data about college students, their academic advisors, the clubs they belong to, the moderators of the clubs, and the activities that the clubs sponsor. Assume each student is assigned to one academic advisor, but an advisor counsels many students. Advisors do not have to be faculty members. Each student can belong to any number of clubs, and the clubs can sponsor any number of activities. The club must have some student members in order to exist. Each activity is sponsored by exactly one club, but there might be several activities scheduled for one day. Each club has one moderator, who might or might not be a faculty member. Draw a complete E-R diagram for this Database.

(a) All entities with their attributes must be represented, indicating all candidate keys. You must indicate and justify all assumptions you have made.

(b) Describe non-trivial domains for attributes where needed.

(c) Make a decision about the cardinality and participation constraints of all relationships, and add appropriate symbols to the E-R diagram.

Answers

Answer:

Complete design is attached below.please have a look.

Explanation:

Answer:

This is a typical example of a constraint max/min. The method used to solve this problem is called

the method of Lagrange multipliers. Let’s generalize the situation:

Given: A function: f(x, y, z) and a constraint that we can write as g(x, y, z) = 0.

Goal: Find min or max of f(x, y, z) for (x, y, z) satisfying g(x, y, z) = 0.

To have a “visual grasp” for the concept of Lagrange multipliers one can think about the following

problem:

Take a balloon (here approximated by a perfect sphere centered at the origin) and a box (think of

a cube for example). We want to find the maximum radius of the balloon (this is the function to

maximize) that can fit inside the box (this is the constraint). We start inflating the balloon and we

realize that the maximum radius is obtained when the balloon touches the box. At the touching

point(s) the surface of the balloon and the one of the box are tangent to each other!

This simple experiment is not a special case. In fact in general1

if P0 = (x0, y0, z0) is a point sitting

on the level surface given by the constraint where max/min for f occur, then at this point the level

surface of the constraint is tangent to the level surface of f passing through P0:

If the two surfaces are tangent, then all normal vectors to the two surfaces are parallel to each other.

In particular their gradients at P0 are parallel, that is

O~ f(P0) = λO~ g(P0) (3.1)

for some parameter λ. This parameter is called the Lagrange multiplier.

We discovered that the max/min points for a function f(x, y, z) constraint by g(x, y, z) = 0 are

found among the solutions (x, y, z, λ) for the system

O~ f(x, y, z) − λO~ g(x, y, z) = 0

g(x, y, z) = 0.

Notice that this system contains four equations and four unknowns:

∂x

f(x, y, z) − λ

∂x

g(x, y, z) = 0

∂y

f(x, y, z) − λ

∂y

g(x, y, z) = 0

∂z

f(x, y, z) − λ

∂z

g(x, y, z) = 0

g(x, y, z) = 0.

(3.2)

but in general it is not a linear system!

One can present the method of Lagrange Multipliers in a more efficient (but less illuminating) way.

Define in fact the new function

L(x, y, z, λ) = f(x, y, z) − λg(x, y, z).

The critical points of L solve the vector equation

O~ L(x, y, z, λ) = 0.

But remember that now the variables are (x, y, z, λ) so we need to take four partial derivatives for

L. If one does so then again (3.2) is obtained!

Personal Web Page Generator Write a program that asks the user for his or her name, then asks the user to enter a sentence that describes himself or herself. Here is an example of the program's screens: Enter your name: Describe yourself: Once the user has entered the requested input, the program should create an HTML file, containing the input, for a simple Web page.

Answers

Answer:

// Python code

username=input("Type your name: ")

desc=input("Describe yourself: ")

f=open('profile.html','w')

html="<html>\n"+\

     "<head>\n"+\

     "</head>\n"+\

     "<body>\n"+\

     "<center>\n"+\

     "<h1>"+username+"</h1>\n"+\

     "</center>\n"+\

     "<hr/>\n"+\

     desc+"\n"\

     "<hr/>\n"+\

     "</body>\n"+\

     "</html>\n"

f.write(html)

f.close()

Code for profile.html file

<html>

<head>

</head>

<body>

<center>

<h1>Jon Doe</h1>

</center>

<hr/>

A software engineer working at a startup.

<hr/>

</body>

</html>

Explanation:

Get the name and description of user  as an input.Write HTML content by opening the file. Create and develop the essential HTML syntax. Write the information into the HTML file and finally close the file. Write the HTML code in the profile.html file.

Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. The program should check for a leap year. A year is a leap year if it is divisible by 4, but not divisible by 100. For example, 1992 and 2008 are divisible by 4, but not by 100. A year that is divisible by 100 is a leap year if it is also divisible by 400. For example, 1600 and 2000 are divisible by 400. However, 1800 is not a leap year because 1800 is not divisible by 400.

Answers

Answer:

C++:

C++ Code:

#include <iostream>

#include <string>

using namespace std;

struct date

{

  int d,m,y;

};

int isLeap(int y)

{

  if(y%100==0)

  {

      if(y%400==0)

      return 1;

      return 0;

  }

  if(y%4==0)

  return 1;

  return 0;

}

int day_no(date D)

{

  int m = D.m;

  int y = D.y;

  int d = D.d;

  int i;

  int mn[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};

  for(i=0;i<m;i++)

  {

      d += mn[i];

  }

  if(isLeap(y))

  {

      if(m>2)

      d++;

  }

  return d;

}

date get_info(string s)

{

  date D;

  int i,p1,p2,l = s.length();

  for(i=0;i<l;i++)

  {

      if(s[i] == '-')

      {

      p1 = i;

      break ;

      }

  }

  for(i=p1+1;i<l;i++)

  {

      if(s[i] == '-')

      {

      p2 = i;

      break ;

      }

  }

 

  D.m = 0;

  for(i=0;i<p1;i++)

  D.m = (D.m)*10 + (s[i]-'0');

 

  D.d = 0;

  for(i=p1+1;i<p2;i++)

  D.d = (D.d)*10 + (s[i]-'0');

 

  D.y = 0;

  for(i=p2+1;i<l;i++)

  D.y = (D.y)*10 + (s[i]-'0');

 

  return D;

 

}

int main()

{

  string s1 = "4-5-2008";

  string s2 = "12-30-1995";

  string s3 = "6-21-2000";

  string s4 = "1-31-1500";

  string s5 = "7-19-1983";

  string s6 = "2-29-1976";

 

  cout<<"Date\t\tDay no\n\n";

  cout<<s1<<"\t"<<day_no(get_info(s1))<<endl;

  cout<<s2<<"\t"<<day_no(get_info(s2))<<endl;

  cout<<s3<<"\t"<<day_no(get_info(s3))<<endl;

  cout<<s4<<"\t"<<day_no(get_info(s4))<<endl;

  cout<<s5<<"\t"<<day_no(get_info(s5))<<endl;

  cout<<s6<<"\t"<<day_no(get_info(s6))<<endl;

 

 

  return 0;

}

Explanation:

The computer program that prints the day number of the year, given the date in the form month-day-year is; written below

How to write computer programs?

#include <iostream>

using namespace std;

bool isLeapYear(int year);

bool isLeapYear(int year)

{  

   if ((year  % 4 == 0) && (year % 100 != 0))

       ((year % 100 == 0) &&(year % 400 == 0));

   {

       cout << year << " is a leap year";

       return true;

}

   return false;

}

   int main ()

   {

       int day, month, year, dayNumber;

       char ch;

       cout << "\n\n\tEnter a date(mm-dd-yyyy) : ";

       cin >> month;

       cin >> ch;

       cin >> day;

       cin >> ch;

       cin >> year;

      dayNumber = 0;

       

       if ((month >= 1 && month <= 12) && (day >=1 && day <= 31))

       {

           while (month > 1 && month <= 12)

               {

                       switch (month - 1)

                       {

                           case 1:

                           case 3:

                           case 5:

                           case 7:

                           case 8:

                           case 10:

                           case 12:

                               dayNumber += 31;

                               break;

                           case 4:

                           case 6:

                           case 9:

                           case 11:

                               dayNumber += 30;

                               break;

                           case 2:

                               dayNumber += 28;

                               if (isLeapYear(year))

                                   dayNumber++;

                               break;

                       }

      month--;

        }

           }

           else {

               cout << "Enter Correct month or day";

               return 0;

           }

           dayNumber += day;

           cout << "\n\n\tThe day number is " << dayNumber;

           return 0;

       }

Read more about computer programming at; https://brainly.com/question/23275071

Consider a satellite orbiting the earth. Its position above the earth is specified in polar coordinates. Find a model-view matrix that keeps the viewer looking at the earth. Such a matrix could be used to show the earth as it rotates.

Answers

Answer:

[1 0 0 0]

[0 1 0 0]

[0 0 1 -d]

[0 0 0 1]

Explanation:

Which layer of the OSI reference model is responsible for ensuring flow control so that the destination station does not receive more packets that it can process at any given time? Group of answer choices

Answers

Answer: The Transport Layer of the OSI reference model is responsible for ensuring flow control so that destination station does not receive more packets that it can process at any given time.

Explanation: This is because;

The transport layer is the fourth layer in the OSI layered architecture which builds on the network layer to provide data transport that moves from a process on a source machine to a process on a destination machine. It is hosted using single or multiple networks, and very responsible for reliable data delivery ensuring packets are delivered in sequence, error-free and with little or no duplication or losses.

Since Transport layer helps one to control the reliability of a link through flow control, error control, and segmentation or desegmentation, It determines how much data should be sent where and at what rate.  

The transport layer also offers an acknowledgment of the successful data transmission and sends the next data in case no errors occurred. TCP (Transmission Control Protocol )is the best-known example of the transport layer. Transport layers also retransmit messages if they arrive with errors.

Other Questions
Please help asap!! Will give brainlist :) Which is not a mineral?A. copperB. graphite C. sugarD. table salt At almost every level of government in the United States, a candidate does not have to win the majority of votes to win an election; instead a candidate wins based on a _________ of votes. The radiator of a steam heating system has a volume of 20 L and is filled with superheated water vapor at 200 kPa and 200C. At this moment both the inlet and the exit valves to the radiator are closed. After a while it is observed that the temperature of the steam drops to 80C as a result of heat transfer to the room air, which is at 21C. Assuming the surroundings to be at 0C, determine (a) the amount of heat transfer to the room and (b) the maximum amount of heat that can be 462 EXERGY supplied to the room if this heat from the radiator is supplied to a heat engine that is driving a heat pump. Assume the heat engine operates between the radiator and the surroundings. George is a fast worker. He can mop 34 ft2 in 1 minute. The court is shaped like a rectangle. It is 95 ft long by 50 ft wide. How many minutes will it take George to mop the gym floor?a.) 4,750 minutesb.) 2691.7 minutesc.) 139.7 minutesd.) 246.1 minutes _________ is a latin word for attendant can be natural or man-made What is the molarity of a KF(aq) solutioncontaining 116 grams of KF in 1.00 liter ofsolution? Which Romanticist fought to set Italy free from Austrian rule?IrvingCarbonariChopinGaribaldi Complete the following sentences with the correct pronouns.1. Ins__________da el dinero a m.2. Eliana_________habla a ti esta noche.3. Jorge________da el lpiz a m.4. T__________preguntas a Glenda.5. Ellos________explican la tarea a Beatriz y a Carlos.6. Yo________doy la tarea a Ud.7. Diana______ compra unos regalos a Yolanda y a m.8. T_________dices las respuestas al profesor. In number theory, a perfect number is a positive integer that is equal to the sum of its proper positive divisors, that is, the sum of its positive divisors excluding the number itself (also known as its aliquot sum). Equivalently, a perfect number is a number that is half the sum of all of its positive divisors (including itself). Write a Python3 program to check if a user-entered number is a perfect number or not. Use exception handling to handle invalid inputs. The University of Chicago Press is wholly owned by the university. It performs the bulk of its work for other university departments, which pay as though the press were an outside business enterprise. The press also publishes and maintains a stock of books for general sale. The press uses normal costing to cost each job. Its job-costing system has two direct-cost categories (direct materials and direct manufacturing labor) and one indirect-cost pool (manufacturing overhead, allocated on the basis of direct manufacturing labor costs). The following data (in thousands) pertain to 2014:Direct materials and supplies purchased on credit $800Direct materials used 710Indirect materials issued to various production departments 100Direct manufacturing labor 1,300Indirect manufacturing labor incurred by various production departments 900Depreciation on building and manufacturing equipment 400Miscellaneous manufacturing overhead incurred by various production departments (ordinarily detailed as repairs, photocopying, utilities, etc.) 550Manufacturing overhead allocated at 160% of direct manufacturing labor costs?Cost of goods manufactured 4,120Revenues 8,000Cost of goods sold (before adjustment for under- or over-allocated manufacturing overhead) 4,020Inventories, December 31, 2013 (not 2014): Materials Control 100 Work-in-Process Control 60 Finished Goods Control 5001. Prepare an overview diagram of the job-costing system at the University of Chicago Press.2. Prepare journal entries to summarize the 2014 transactions. As your final entry, dispose of the year-end under- or over-allocated manufacturing overhead as a write-off to Cost of Goods Sold. Number your entries. Explanations for each entry may be omitted.3. Show posted T-accounts for all inventories, Cost of Goods Sold, Manufacturing Overhead Control, and Manufacturing Overhead Allocated.4. How did the University of Chicago Press perform in 2014? What has been the greatest injustice in regards to the Native Americans? the angle of elevation from point c to the top of the cliff is 34. if point c is 1,000 ft from the base of the cliff, how high is the cliff. If Ann so wishes, then Bill will be the president. Manuel is a public defender or Bill will be the president. Manuel is not a public defender. Therefore, Ann does not so wish. Which type of marcomolecule is made of amino acids? 12Problem Solving What problems did sodbustersencounter when farming the Great Plains? How didsome sodbusters overcome these problems? what is the most difficult thing in chemistry to learn? a car dealership pays 8,350 for a car. they mark up the price by 17.4% to get the retail price. what is the retail price at this dealership The HCF of 2 numbers is 75 and their LCM is 1500. If one of the numbers is 300, find the other. Perception refers to:________ 1. a person's consistent behaviors or responses to recurring situations. 2. a learned predisposition to respond to an object or class of objects in a consistently favorable or unfavorable way. 3. the process by which an individual selects, organizes, and interprets information to create a meaningful picture of the world. 4. seeing or hearing messages without being aware of them. 5. the way people see themselves and 6. the way they believe others see them.