Write an expression using Boolean operators that prints "Special number" if special_num is -99, 0, or 44.

Answers

Answer 1

A sample expression that uses Boolean operators that prints "Special number" if special_num is -99, 0, or 44 is given below:

The Program

import java.util.Scanner;

import java.io.*;

public class Test

{

   public static void main(String[]args) throws IOException

   {

       File file = new File("SNUMS.INP");

       Scanner inputFile = new Scanner(file);

       int order = 1;

       int i = 1;

      int[] special = new int[1000000+1];

       // Write all 10^6 special numbers into an array named "special"

       while (order <= 1000000)

       {

           if (specialNumber(i) == true)

           {

              special[order] = i;

               order++;

           }

           i++;

       }

       // Write the result to file

       PrintWriter outputFile = new PrintWriter("SNUMS.OUT");

       outputFile.println(special[inputFile.nextInt()]);

       while (inputFile.hasNext())

           outputFile.println(special[inputFile.nextInt()]);

       outputFile.close();

   }

   public static boolean specialNumber(int i)

   {

       // This method check whether the number is a special number

       boolean specialNumber = false;

      byte count=0;

       long sum=0;

       while (i != 0)

       {

           sum = sum + (i % 10);

           count++;

           i = i / 10;

       }

       if (sum % count == 0) return true;

       else return false;

    }

}

Read more about boolean operators here:

https://brainly.com/question/5029736

#SPJ1


Related Questions

Account A can retrieve or modify any relation except DEPENDENT and can grant any of these privileges to other users. (b) Account B can retrieve all the attributes of EMPLOYEE and DEPARTMENT except for SALARY, MGRSSN, and MGRSTARTDATE. (c) Account C can retrieve or modify WORKS_ON but can only retrieve the FNAME, MINIT, LNAME, SSN attributes of EMPLOYEE and the PNAME, PNUMBER attributes of PROJECT. (d) Account D can retrieve any attribute of EMPLOYEE or DEPENDENT and can modify DEPENDENT. (e) Account E can retrieve any attribute of EMPLOYEE but only for EMPLOYEE tuples that have DNO = 3. (f) Write SQL statements to grant these privileges. Use views were appropriate

Answers

The SQL statements to grant these privileges are as follows:

GRANT SELECT, UPDATE

        ON EMPLOYEE, DEPARTMENT, DEPT_LOCATIONS, PROJECT,

        WORKS_ON

        TO ACCOUNTA

        WITH GRANT OPTION;

CREATE VIEW EMPS AS

        SELECT FNAME, MINIT, LNAME, SSN, BDATE, ADDRESS, SEX

        SUPERSSN, DNO

        FROM EMPLOYEE;

        GRANT SELECT ON EMPS

       TO ACCOUNTB;

       CREATE VIEW DEPTS AS

       SELECT DNAME, DNUMBER

       FROM DEPARTMENT;

       GRANT SELECT ON DEPTS

       TO ACCOUNTB;

GRANT SELECT, UPDATE

       ON WORKS_ON

       TO ACCOUNTC;

      CREATE VIEW EMP1 AS

      SELECT FNAME, MINIT, LNAME, SSN

      FROM EMPLOYEE;

      GRANT SELECT ON EMP1

      TO ACCOUNTC;

      CREATE VIEW PROJ1 AS

      SELECT PNAME, PNUMBER

      FROM PROJECT;

     GRANT SELECT ON PROJ1

     TO ACCOUNTC;

GRANT SELECT ON EMPLOYEE, DEPENDENT

       TO ACCOUNTD;

      GRANT UPDATE ON DEPENDENT

      TO ACCOUNTD;

CREATE VIEW DNO3_EMPLOYEES AS

        SELECT * FROM EMPLOYEE

        WHERE DNO = 3;

        GRANT SELECT ON DNO3_EMPLOYEES

        TO ACCOUNTE;

What do you mean by SQL statement?

SQL statement may be defined as a domain-specific language that is significantly utilized in programming and designed for controlling data held in a relational database management system. SQL stands for Structured Query Language.

Therefore, the SQL statements to grant these privileges are well described above.

To learn more about SQL statements, refer to the link:

https://brainly.com/question/14312429

#SPJ1

Identify any two laws and explain their implications on the use of email in an organisation in terms of transmission of information via the Internet

Answers

The law of email is crucial. Email has been and continues to be a crucial tool for communication. While some people connect via social media, teamwork apps, and instant messaging, many people still use email, particularly for business.

What is about law of email?The law of email is crucial. Email has been and continues to be a crucial tool for communication. While some people connect via social media, teamwork apps, and instant messaging, many people still use email, particularly for business. It is imperative that people abide by the laws, regulations, codes, and standards that apply to email because if they don't, the communication channel may be jeopardized. Email has certain risks attached to it as well. Most nations rarely have laws that specifically address email. The Email Act, for instance, is hardly ever found. However, email is covered by a wide range of regulations. E-commerce regulations, for instance, frequently apply (like the ECT Act in South Africa).

To learn more about Email Act refer to:

https://brainly.com/question/25642105

#SPJ1

Give some examples of when either breaking the rules or following the rules lead to greater good

Answers

Answer:

Sometimes breaking a rule can lead to a positive outcome, especially if the rule prevents the positive. But on the other hand, following the rules, can also lead to the greater good, if the rule doesn't prevent the good from happening.

Explanation:

what's formatting in computer​

Answers

Answer:

completrly erasing

Explanation:

Reformatting a computer means completely erasing (formatting) the hard drive and reinstalling the operating system and all other applications and files. All of your data on the hard disk will be lost, so you will need to back it up to an External HD, DVD, flashdrive or another computer.

Formatting of computer means erasing something like hard drive disks etc.

Explanation:

Format or document format is the overall layout of a document or spreadsheet. For example, the formatting of text on many English documents.

Please help! AP CSP problem.

Answers

Answer:

a is the correct answer ok

Your boss asks you to upgrade a desktop computer to add an extra DVI port for a second monitor. How would you recommend completing this request?

Answers

Where your boss asks you to upgrade a desktop computer to add an extra DVI port for a second monitor, the following steps are recommended:

If your PC only has one video port, you should be aware that you cannot use a splitter on a single SGVA, HDMI, or DVI interface. If you try to use a splitter with any of these ports, the same image will appear on both displays. It will not expand your work area over both monitors and work independently.

If your PC has a USB port, the best option is to purchase a DisplayLink connector. A DisplayLink connector allows you to connect and extend your display to another display by connecting it to a USB port.

What is a DVI Port?

DVI, which stands for Digital Visual Interface, provides a noticeably crisper and better image than VGA. Because it can transport both digital and analog signals, it is a one-of-a-kind connection. DVI may simply be converted to other standards such as HDMI and VGA.

The Digital Display Working Group created the DVI (Digital Visual Interface) digital video interface (DDWG). It is often found on computers, LCD monitors, projectors, and other digital display devices and can accommodate both digital and analog video signals via a single DVI connection.

Learn more about DVI Ports:
https://brainly.com/question/7008263
#SPJ1

Python programming using def function

Give the user a math quiz where they have
to subtract 2-digit integers. Present them
like this: 67 - 55.
Each time, tell the user whether they are
correct or incorrect. Continue presenting
problems to them until they enter a zero to
quit. At the end print the number right,
the number wrong, and the percent right.

Answers

Explanation:

For this program we'll need to know a couple concepts which are: while loops, user input, variables, converting strings to integers, and basic arithmetic operators, if statements, and the random module.

So let's first just declare the basic function, we can call this "main", or something a bit more descriptive, but for now I'll name it "main".

def main():

   # code will go here

main()

so now from here, we want to initialize some variables. We need to somehow keep track of how many they get correct and how many they've answered.

These two numbers may be the same, but at times they will be different from each other, so we'll need two variables. Let's just call the variable tracking how much have been answered as "answered" and the variable tracking how much are correct as "correct".

These two will initially be zero, since the user hasn't answered any questions or gotten any correct. So now we have the following code

def main():

   correct = 0

   answered  = 0

main()

Now let's use a while loop, which we break out of, once the user inputs zero. This may be a bit tricky if we use a condition since we'll have to ask for input before, so let's just use a while True loop, and then use an if statement to break out of it at the end of the loop.

Now we want to generate two numbers so we can use the random module. To access the functions from the random module you use the import statement which will look like this "import random". Now that you have access to these functions, we can use the randint function which generates random numbers between the two parameters you give it (including those end points). It says two digits, so let's use the endpoints 10 and 98, and I'll explain later why I'm limiting it to 98 and not 99.

The reason we want to limit it to 98 and not 99, is because it's possible for the two randomly generated numbers to be equal to each other, so the answer would be zero. This is a problem because the zero is used to quit the program. So what we can do in this case, is add one to one of the numbers, so they're no longer equal, but if they're equal to 99, then now we have a three digit number.

Now onto the user input for simplicitly, let's assume they enter valid input, all we have to do is store that input in a variable and convert it into an integer. We can immediately convert the input into an integer by surrounding the input by the int to convert it.

we of course want to display them the equation, and we can either do this through string concatenation or f-strings, but f-strings are a bit more easier to read.

So let's code this up:

import random

def main():

   correct = 0

   answered  = 0

   while True:

       num1 = random.randint(10, 98)

       num2 = random.randint(10, 98)

       

       if num1 == num2:
           num2 += 1

       userInput = int(input(f"{num1} - {num2}"))

main()

from here we first need to check if they entered zero and if so, break out of the loop. If they didn't enter zero, check if the userInput is equal to the actual answer and if it is, then add one to correct and finally add one to answered regardless of whether their answer is correct or not.

Outside the loop to display how much they got correct we can use an f-string just like we did previously. Since sometimes we'll get a non-terminating decimal, we can use the round function so it rounds to the nearest hundreth.

So let's code this up:

import random

def main():

   correct = 0

   answered  = 0

   while True:

       num1 = random.randint(10, 98)

       num2 = random.randint(10, 98)

       if num1 == num2: # the answer would be zero
           num2 += 1 # makes sure the answer isn't zero

       userInput = int(input(f"{num1} - {num2}"))

       if userInput == 0: # first check if they want to stop

           break

       if userInput == (num1 - num2):
           correct += 1

       answered += 1

   print(f"Correct: {correct}\nIncorrect: {answered - correct}\nPercent: {round(correct/answered, 2)}")

main()

and that should pretty much be it. The last line is just some formatting so it looks a bit better when displaying.

Write an SQL statement to display for every restaurant the name of the restaurant (where the name of the restaurant consists of more than 10 characters) and for every category of menu item its description (catdesc). Furthermore, display the average; cheapest or lowest; and highest or most expensive price of all menu items in that category at that restaurant. Use single row functions to format all the prices. The average price must be padded; the cheapest price must be rounded; but the highest price must not be rounded. Display only those menu items of which the average item price is more than R40. Sort your results according to the restaurant names and for every restaurant from the most expensive average menu item to the cheapest average menu item. Display your results exactly as listed below.

Answers

Using the knowledge in computational language in SQL it is possible to write the code that display for every restaurant the name of the restaurant  and for every category of menu item its description.

Writting the code:

INSERT INTO Dish Values(13, 'Spring Rolls', 'ap');

INSERT INTO Dish Values(15, 'Pad Thai', 'en');

INSERT INTO Dish Values(16, 'Pot Stickers', 'ap');    

INSERT INTO Dish Values(22, 'Masaman Curry', 'en');  

INSERT INTO Dish Values(10, 'Custard', 'ds');  

INSERT INTO Dish Values(12, 'Garlic Bread', 'ap');    

INSERT INTO Dish Values(44, 'Salad', 'ap');    

INSERT INTO Dish Values(07, 'Cheese Pizza', 'en');  

INSERT INTO Dish Values(19, 'Pepperoni Pizza', 'en');    

INSERT INTO Dish Values(77, 'Veggie Supreme Pizza', 'en');

INSERT INTO MenuItem Values(0, 0, 13, 8.00);

INSERT INTO MenuItem Values(1, 0, 16, 9.00);

INSERT INTO MenuItem Values(2, 0, 44, 10.00);

INSERT INTO MenuItem Values(3, 0, 15, 19.00);

INSERT INTO MenuItem Values(4, 0, 22, 19.00);

INSERT INTO MenuItem Values(5, 3, 44, 6.25);

INSERT INTO MenuItem Values(6, 3, 12, 5.50);

INSERT INTO MenuItem Values(7, 3, 07, 12.50);

INSERT INTO MenuItem Values(8, 3, 19, 13.50);

INSERT INTO MenuItem Values(9, 5, 13, 6.00);

INSERT INTO MenuItem Values(10, 5, 15, 15.00);

INSERT INTO MenuItem Values(11, 5, 22, 14.00);

See more about SQL atbrainly.com/question/13068613

#SPJ1

There are a number of security risks associated with using the Internet. Name three of these risks For each, state why it is a risk and describe how the risk can be minimized. Security risk 1........ [1] Why it is a risk......... How to minimise the risk.......... [1​

Answers

The three risks was  computer virus , spyware and phishing.

How we can minimize risk?

Protecting the organisation from an expanding range of threats such as... hardware and software failure - such as power loss or data corruption - includes securing corporate systems, networks, and data as well as ensuring availability of systems and services, planning for disaster recovery and business continuity, complying with government regulations and license agreements, and managing risk.

Malicious software intended to obstruct computer operations is known as malware. Machine code known as viruses can replicate and move from one computer to another, frequently causing disruptions in computer operations.

Never leave anything unattended in an open location, a shared residence, or somewhere that could be seen by trespassers. Use physical locks or carry them around with you. Carry your laptop and other electronics in a discrete protective bag or case.

To learn more about malware refer to:

https://brainly.com/question/399317

#SPJ9

this is my data cancer['level_description'].head(10).plot.pie()
and the error says TypeError: '<' not supported between instances of 'str' and 'int'

Answers

Only items with the same numerical data type can be compared using mathematical operators. If you try to compare a string and an integer, you will get an error saying "not supported between instances of'str' and 'int'."

What is typeerror: '>' not supported between'str' and 'int' instances?Comparison operators cannot be used to compare strings and integers. This is due to the fact that strings and integers are different data types.Python is a programming language that is statically typed. If you need to compare a value of one type to another, you must manually change the type of the data.Let's say you want to convert a string to an integer. Before the comparison can take place, you must manually convert the string to an integer.When you try to perform a "greater than" comparison on a string and an integer, you get the "typeerror: '>' not supported between instances of'str' and 'int'" error.This error can occur with any comparison operation, including less than (), equal to (=), and greater than or equal to (>=).The string returned by the input() method. This means that our code attempts to compare a string to an integer (the value in "numerical grade").We solve this issue by converting "numerical grade" to an integer before performing any code comparisons:

To learn more about 'str' and 'int' refer to:https://brainly.com/question/26352522

#SPJ1

Meaning of learning application software, meaning of Achitertoral /Engineering application software , meaning of Entertainment application software​

Answers

Computer software is referred as a  programming code executed on a computer processor.  It can be machine-level code or written code  for an operating system.

Meaning of given terms:

Learning application software: It can help you in gaining new skills, provide you with proper instructions and even make you continuously learn in different criteria and subjects.

It makes the study more easy , quicker as well as provide continuous assessment to children.

It include Moodle, Blackboard learn etc

Architectural software : It can help in designing, visualizing various formats of given work. From planning homes, to mansions it can provide and turn vision into reality.

It includes AUTOCAD, Sketchup

Entertainment Software: It provides amusement and opportunities for leisure activities. It help in relaxing, enjoying and escaping from the different situations.

It includes Netflix, amazon and Kodi.

Therefore every term has been described.

To learn more about Software from the given link

https://brainly.com/question/24970491

#SPJ13

[SPECIAL]>>>WRITE THIS TEXT IN BINARY CODE

Answers

Answer: GET YOUR BONUS

in binary code

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 01010011

THX:

01010100 01001000 01000001 01001110 01001011 00100000 01011001 01001111 01010101

Answer:

01000111 01000101 01010100 00100000 01011001 01001111 01010101 01010010 00100000 01000010 01001111 01001110 01010101 0101001

A ____ risk assessment evaluates threats to and vulnerabilities of the network.

Answers

Answer:

Vulnerability

Explanation:

Vulnerability refers to a weakness in your hardware, software, or procedures

which country did poker originate from?

Answers

Poque, a game that dates back to 1441 and that was supposedly invented in Strasbourg, seems to be the first early evidence of the French origin of the game. Poque in particular used a 52-card deck

France/French

this is for a SQL server class:

Database level permissions apply to a specific database. Assigning permissions at this level is inefficient when dealing with ____

a. users with no permissions
b. large user groups
c. all of the above

Answers

Assigning permissions at this level is inefficient when dealing with large user groups. The correct option is b.

What is database-level permission?

Permissions are the many sorts of access that are granted to specific securable. At the server level, permissions are assigned to SQL Server logins and server roles. At the database level, they are assigned to database users and database roles.

Read, write, and execute are the three types of permissions that files and directories can have. Anyone with reading permission can view the contents of a file or directory.

Therefore, the correct option is b. large user groups.

To learn more about database-level permission, refer to the link:

https://brainly.com/question/13108159

#SPJ1

C++ Perform the task specified by each of the following statements:

a) Write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.

b) Write the function prototype for the function in part (a).

c) Write the function header for the function add1AndSum that takes an integer array parameter oneTooSmall and returns an integer.

d) Write the function prototype for the function described in part (c).

Answers

Using the knowledge in computational language in C++ it is possible to write the code that write the function header for function zero that takes a long integer array parameter bigIntegers and does not return a value.

Writting the code:

a) void zero (long bigIntegers[], int size) //function header

{

//Body of function

}

b) void zero (long [], int); //function prototype

c) int add1AndSum (int oneTooSmall[], int size)//function header

{

//Body of function

}

d) int add1AndSum (int [], int); //function prototype

See more about C++ at brainly.com/question/29225072

#SPJ1

“A military contractor has been asked to produce a new all-terrain tablet PC which will be used by the armed forces when out in combat situations. Cost is not an option, lives could well depend on how reliable this tablet PC is under extreme conditions.

Answers

Storage devices are pieces of hardware used to store large amounts of data. Storage devices such as SD cards and SSD cards can be used in military operations because they are durable, do not break easily, and can store large amounts of data.

What exactly is a storage device?

Storage devices are any type of computing hardware that is used to store, transfer, or extract data. Storage devices can temporarily and permanently hold and store data. They can be either internal or external to a computer.

SD cards are the best device for storing and playing large data files. SSDs, on the other hand, are designed to run a computer's operating system partition.

One device serves a simpler purpose, whereas the other must be smarter and more adaptable. These are the most compatible storage devices for military applications.

Thus, it is reliable this tablet PC is under extreme conditions.

For more details regarding storage devices, visit:

https://brainly.com/question/11599772

#SPJ1

Your question seems incomplete, the probable complete question is:

Read the following scenarios carefully and select a suitable storage device for each situation. Make sure to justify your choice by talking about the characteristics of your chosen storage device such as Capacity, Speed, Portability, Durability and Reliability.

(a) “A military contractor has been asked to produce a new all-terrain tablet PC which will be used by the armed forces when out in combat situations. Cost is not an option, lives could well depend on how reliable this tablet PC is under extreme conditions.”

1. Keep the flyer to one page.
2. Be sure the flyer is easy to read and has an attractive design
3. Be sure to provide all information on the flyer as indicated on page 168
4. Use a SmartArt graphic
5. Use a bulleted list
6. Use a picture graphic
7. Choose a color scheme
8. Be creative!

Answers

To quickly and easily create a visual representation of your knowledge, create a SmartArt graphic. You can select from a variety of layouts to clearly convey your message or ideas.

Make a brand-new SmartArt image.

To quickly and easily create a visual representation of your knowledge, create a SmartArt graphic. You can select from a variety of layouts to clearly convey your message or ideas. Excel, Outlook, PowerPoint, and Word all support the creation and use of SmartArt visuals.

See Choose a SmartArt graphic for an overview of SmartArt graphics, including tips for selecting the right visual and layout style to present your data or illustrate a point.

Notes:

Click the arrow control next to the SmartArt graphic to reveal the Text pane if it is not already there.On the Place tab, in the Text group, select Text Box to insert a text box so that you can add text, such as a title, anywhere near or on top of your SmartArt design. Right-click your text box, select Format Shape or Format Text Box, and then choose to make the text box's background and border transparent if you only want the text inside it to show up.

To learn more about SmartArt refer to

https://brainly.com/question/4911152

#SPJ1

Q: Define the following terms:
(i) Computer
(ii) Program
(iii) Data

Answers

i) an electronic device for storing and processing data according to instructions given to it in a variable program. -computer
ii) A collection of instructions that performs a specific task when executed by a computer. - program
iii) Data is a collection of numbers gathered to give some information. - data

model sees communication occurring in five key parts
19. The
20
means the systematic application of scientific or other organized knowledge to practical task
21. The model that shows our communication is influenced by environmental, cultural and personal
factors
22. Shannon Weaver model was proposed in the year
23. Fourth generation computers used
24. Auto Gasoline pump is an example of a
25.
26.
27.
28.
29.
30. A server may run several
31. The first mechanical computer designed by Charles Babbage uses,
32.
33. The first generation of computer uses
34
computer
computer are mainly used in the fields of science and engineering
provides us with necessary diversion
available for educational purposes other than the teacher
are the means of communication
is when two persons communicate with each other.
controls educational technology in every way.
is the order in which the content should be taught for the best teaming within a grade?
is a distortion in a message which affects the flow of communication
refers to the facilities used for motion pictures, television, computer, sounds?
35.
36. Aristotle model proposed in the year
37. The first computer designed by Charles Babbage was called
38. Communication result in sharing of
and
39. A Supercomputer is the very
40.
41. A typical modern computer uses
42
and
is the operation of data per giving instruction
type of computer for processing data
chips
computer are used in scientific calculations, for nation defense and radar systems
43. The person who is responsible in the integration of technology in classroom instruction is-
44. A server run several
45. These are types in the classifications of the computer according to size, Except
46 Second generation computers used.
47.
48. The acronomy SNS stands for
is used to send individual or group messages
49. These are example of Barriers in communication, Except
50. Computer cannot do anything without a
PRI

Answers

Model sees comunication key parts so its 15 x because it sayd on the text

3. Programmers use indenting to organize their code so that it is readable and can be easily debugged. x = 12 if x ==12: print ("x is equal to 12.")

Which of the following keys on the keyboard is used to quickly indent text?
*
Control
Return
Tab
Right Arrow

Answers

Answer:Quickly indent text can be done using key Tab on the keyboard.

Answer: Option C

Explanation:

Code is readable and can be easily debugged because programmers use indenting to organize it . In a computer, any programmer to develop a program both space and tab keys can be used to indent text.

Tab key used to indent the text quickly whereas the space key used to indent text but not to indent text quickly. Tab can be used as the standard key for indenting in the computer programs.

Explanation:

The correct answer would option c

The cpu is the component responsible for commanding which other component in the system?

Answers

The CPU is the component responsible for commanding memory in the system. The correct option is 3.

What is a CPU?

The CPU is instructed on what to do next and how to communicate with other components by the operating system, a sizable program.

As you are aware, there are numerous computer operating systems, including the Microsoft Windows operating system. An operating system is a substantial piece of software that controls your computer and aids the CPU in decision-making. The CPU is controlled by an operating system so that it can communicate with other system components.

Therefore, the correct option is 3. Memory.

To learn more about CPU, refer to the link:

https://brainly.com/question/14671593

#SPJ1

The question is incomplete. Your most probably complete question is given below:

1. CPU

2. bus

3. memory

4. I/O subsystem.

Explain why you would select the waterfall model to implement the baby monitoring system by describing the advantages of using the waterfall model in projects like this which consists of a large scope.

Answers

The waterfall model's benefits includes Teams must follow a set of stages in a waterfall process, never going on until each phase is finished. Smaller projects with clear-cut deliverables from the beginning are best suited for this framework.

Why did you choose waterfall model?

When a project must adhere to stringent guidelines, the waterfall technique is preferable because it calls for deliverables for each step before moving on to the next.

Note that As an alternative, Agile is better suited for teams who want to move quickly, experiment with direction, and start without knowing exactly how the project will turn out.

Therefore, The sequential Waterfall Model separates software development into pre-established segments. Before the following phase can start, each phase must be finished.

Learn more about Waterfall Model from

https://brainly.com/question/14079212
#SPJ1

IN python

Write a main function that asks the user to enter a series of numbers on the same line. The
function should store the numbers in a list and then display the lowest, highest, total, and average
of the numbers in the list in addition to the list of numbers above the average.
The program should have the following functions:
• A function that takes a list of numbers and returns the lowest number in the list.
• A function that takes a list of numbers and returns the highest number in the list.
• A function that takes a list of numbers and returns sum of the numbers in the list.
• A function that takes a list of numbers and returns the average of the numbers in the list.
• A function that takes a list of numbers and returns a list of numbers above the average.


Here is a sample run:
Enter numbers on the same line
10 23 45 71 8 13 99 5 2 88
Low: 2.0
High: 99.0
Total: 364.0
Average: 36.4
Above Average: [45.0, 71.0, 99.0, 88.0]

iN python

Answers

Using the knowledge of the computational language in python it is possible to write a code that write a main function that asks the user to enter a series of numbers on the same line.

Writting the code:

def minimum(a):

   low = a[0]

   for i in range(1,n):

       if a[i] <= low:

           low = a[i]

   return low

def maximum(a):

   high = a[0]

   for i in range(1,n):

       if a[i] >= high:

           high = a[i]

   return high

def total(a):

   tot = 0

   for i in range(0,n):

       tot += a[i]

   return tot

def average(a):

   total = 0

   for i in range(0,n):

       total += a[i]

   return total/n

   

def above_average(a):

   total = 0

   for i in range(0,n):

       total += a[i]

       

   average = total/n

   above_avg = []

   for i in range(0,n):

       if a[i] > average:

           above_avg.append(float(a[i]))

       

   return above_avg

if __name__ == "__main__":

   print ('Enter numbers on the same line')

   a = list(map(int,input().split()))

   n = len(a)

   

   print("Low: {0:.1f}".format(minimum(a)))

   print("High: {0:.1f}".format(maximum(a)))

   print("Total: {0:.1f}".format(total(a)))

   print("Average: {0:.1f}".format(average(a)))

   print("Above Average:",above_average(a))

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

#SPJ1

1. Review and write summary report on Artificial Intelligence (AI), your report should include from starting point of Al to the future of AI in brief and short way.​

Answers

Summary report on Artificial Intelligence (AI):

The term artificial intelligence broadly refers to the application of technology to perform tasks that resemble human cognitive functioning, and is typically defined as "the ability of a machine to imitate intelligent human behaviour." Artificial intelligence typically involves "the theory and development of artificial intelligence systems capable of performing tasks that normally require human intelligence, such as visual perception, speech recognition, decision making, and  between languages." John McCarthy, one of the founders of the study of artificial intelligence, "defined the field of using computers to do things that are said to be intelligent when people do them."

Artificial intelligence is used as an umbrella term to cover a wide range of different technologies and applications, some of which are mentioned below.

Machine Learning (ML) Natural Language Processing (NLP) Computer vision (CV) Robotics Process Automation (RPA)

AI applications typically involve the use of data, algorithms and human feedback. Ensuring that all these components are properly structured and validated is essential to developing and deploying AI applications.

What is Machine Learning ?

Machine learning is a branch of computer science that uses algorithms to process and learn from large amounts of data. Unlike traditional rule-based programming, ML models10 learn from input data to predict or identify meaningful patterns without being specifically programmed to do so. There are different types of ML models depending on their intended task and structure:

Supervised Machine Learning: In supervised ML, a model is trained with labeled input data that correlates with a specified output. Reinforcement learning: In reinforcement learning, the model learns. dynamically to achieve the desired output through trial and error Unsupervised Machine Learning: In unsupervised ML, the input data is unlabelled and the output is undefined Deep Learning: A deep learning model is built on an artificial neural network where algorithms process large amounts of unlabelled or unstructured data through multiple learning layers  in a way inspired by how neural networks work in the brain

To learn more about machine learning, visit;

https://brainly.com/question/29386217

#SPJ9

common errors in writing Python

Answers

Answer:

1.not following the rules

2.misusing expression

How many subnets and host per subnet are available from network 192.168.43.0 255.255.255.224?

Answers

It should be noted that the number of subnets and hosts available from network 192.168.43.0 255.255.255.224 is 8 and 32, respectively. Only 30 of the 32 hosts are generally functional.

What is a host in computer networking?

A network host is a computer or other device that is connected to a computer network. A host can serve as a server, supplying network users and other hosts with information resources, services, and applications. Each host is given at least one network address.

A computer network is a group of computers that share resources on or provided by network nodes. To communicate with one another, computers use common communication protocols over digital links.

So, in respect to the above response, bear in mind that we may compute the total number of: by putting the information into an online IPv4 subnet calculator.

8 subnets; and30 hosts available for 192.168.43.0 (IP Address) and 255.255.255.224 (Subnet)

Learn more about hosts:

https://brainly.com/question/14258036

#SPJ1

Discuss types of indentation​

Answers

There are three types of indents:
Before text indent: This is also called the left indent. ...
After text indent: This is also called the right indent. ...
First line indent: This option is used to specify indent values for the first line of the document.

First,

- select a classification methodology to learn in your project. Select either Classification Trees or Support Vector Machines.

- To actually get the data used in the ISLR examples, you will likely need to download an R package called ISLR; it contains the data sets used in the text.

- Begin by introducing your reader to the corporation from which your stock data (Leggett & Platt Incorporated) comes. Tell the reader something you learned about that corporation that you found interesting, something which would demonstrate to a recruiter that you possess curiosity and the ability to employ it.

- Then, using trimmed screenshots where needed from Excel, sketch out for the reader how you converted your Yahoo-sourced stock data into lagged stock risk data set since 2006.

Second,

-draw a random sample of size n=300 without replacement from your stock return data set. Recall that your stock return data contains a HiLo return column and standardized log lag1 and log lag2 return columns. I will call this your n=300 stock return data set. Show and explain how this is done.

- draw another random sample of size 300 without replacement from your stock return data set. Recall that your stock risk data contains a HiLo risk column and standardized log lag1 and log lag2 columns. I will call this your n=300 stock risk data set.

Next, using your n=300 stock return data set, walk through the steps covered by the ISLR text for your chosen method, SVM or CART, explaining in your own words what you are doing. Put your name into the title of any graphs you show.

Finally, run the program on your n=300 stock risk data set and compare the performance to that of your n=300 stock return data set. Include use of the chi-square test. Discuss the differences, the reasons that these would happen, and the lessons learned about the nature of the stock market.

third,

Select one of the tuning parameters or decision criteria that lie beneath the surface of your chosen methodology, CART or CART. Engage with it by researching beyond the ISLR text. Then experiment with it. Experiment with your data and with other data sets. Try decreasing or increasing n. Look at other sources for help, documenting the sources.

Forth,

Create classification space plots for both of your n=300 data sets, using your chosen methodology, SVM or CART. Be sure to explain how you went about this. Create the plot using the same techniques that we did in our plots for other methods.

] Prepare a comparative study of knn, naive Bayes, logistic regression, and your selected method. Make this comparison on your two n=300 data sets, splitting the data randomly in half to get the training and testing sets.

Explain what you are doing as you go along, explain what you understand about what distinguishes the methods, discuss reasons why the results vary, and why there might be systematic differences in performance between return data and risk data. Show classification space plots for knn, naïve Bayes, and logistic regression. At the end, show a single table in which you summarize the overall correct forecast rate for the stock returns for the four methods; then another table summarizing the performance on the stock risk data

Answers

Using the knowledge of the computational language in python it is possible to write a code that Create classification space plots for both of your n=300 data sets, using your chosen methodology, SVM or CART.

Writting the code:

def randomize(X, Y):

   permutation = np.random.permutation(Y.shape[0])

   X2 = X[permutation,:]

   Y2 = Y[permutation]

   return X2, Y2

X2, y2 = randomize(X, y)

def draw_learning_curves(X, y, estimator, num_trainings):

   train_sizes, train_scores, test_scores = learning_curve(estimator, X2, y2, cv=None, n_jobs=1, train_sizes=np.linspace(0.1, 1.0, num_trainings))

   train_scores_mean = np.mean(train_scores, axis=1)

   train_scores_std = np.std(train_scores, axis=1)

   test_scores_mean = np.mean(test_scores, axis=1)

   test_scores_std = np.std(test_scores, axis=1)

   plt.grid()

   plt.title("Learning Curves")

   plt.xlabel("Training examples")

   plt.ylabel("Score")

   plt.plot(train_scores_mean, 'o-', color="g",

            label="Training score")

   plt.plot(test_scores_mean, 'o-', color="y",

            label="Cross-validation score")

   plt.legend(loc="best")

   plt.show()

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

#SPJ1

What is the vibrating or buzzing of a hand controller known as?

Answers

The vibrating or buzzing of a hand controller is known as haptic feedback.

What is haptic feedback?

The use of touch to communicate with users is known as haptic feedback. Most people are familiar with the sensation of a vibration in a phone or the rumble in a game controller, but haptic feedback is much more.

Humans have five senses, but electronic devices communicate with us primarily through two: sight and hearing.

Haptic feedback (also known as simply haptics) alters this by simulating the sense of touch. You can not only touch a computer or other device, but the computer can also touch you.

To know more about Haptic feedback, visit: https://brainly.com/question/14868645

#SPJ1

Other Questions
Please Help Find (f-g)(x) if f(x)--3x2+2x-3 and(x)=2x2-3x+4 prejudice is which of the following? multiple choice question. favoritism for one's in-group over all other groups an organized body of information stored in memory that biases the way new information is interpreted, stored, and recalled a generalization about a particular group that does not consider variation between individuals an unjustified negative attitude toward an individual based on their group membership Habitat fragmentation iscaused by...A.overpopulation.B. moving a species of animal to a different habitat.C, oil spill from a boat in the ocean.D. pieces of a habitat being divided. a parallel-plate capacitor in air has circular plates of radius 2.7 cm separated by 1.1 mm. charge is flowing onto the upper plate and off the lower plate at a rate of 7 a. find the time rate of change of the electric field between the plates. The tables represent two linear functions in a system. A 2 column table with 5 rows. The first column, x, has the entries, negative 4, negative 2, 0, 2. The second column, y, has the entries, 26, 18, 10, 2. A 2 column table with 5 rows. The first column, x, has the entries, negative 4, negative 2, 0, 2. The second column, y, has the entries, 14, 8, 2, negative 4. What is the solution to this system? (1, 0) (1, 6) (8, 26) (8, 22) Mark this and return Why is competition is a density-dependent? Do you agree with Odysseus's decision to kill the disloyal servants? Why or why not? help meeeeeeeeeeee pleaseeeeeeeeeee rn rnnnnnnnnn!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!help meeeeeeeeeeee pleaseeeeeeeeeee rn rnnnnnnnnn!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! what are the effects on the accounting equation from the adjustment for revenue earned during the accounting period that had previously been recorded as a liability? Two integers, a and b, have different signs. They absolute value of integer a is divisible by the absolute value of integer b. Find two integers that fit this description. Then decide if she product of the integers is greater than or less than the quotient of the integers. Show your work. a glass slab of thickness 3 cm and refractive index 1.67 is placed on on ink mark on a piece of paper. for a person looking at the mark from a distance of 9.8 cm above it, what well the distance to the ink mark appear to be in cm? Lea sold half of her comic books and thenbought seven more. She now has 29.With how many did she begin? The theme of both "Those Winter Sundays" and "All My Babies Are Gone Now" can best be described asQuestion 4 options:Fathers voluntarily perform their "offices" routinely.Parents just do not understand.Acts of love are often obscured in routine chores.Children are clueless. twenty four hours after a client returns from surgical gastric bypass, the registered nurse (rn) observes large amounts of blood in the nasogastric tube (ngt) cannister. which assessment finding should the rn report as early signs of hypovolemic shock? ava is a senior employee in a technology-based company and earns a good income. she rents a house in a locality that is mainly inhabited by entrepreneurs. though she owns a tastefully decorated apartment and a car, she gets disheartened when she sees large, fancy villas in her neighborhood. she feels frustrated because she feels she is less well-off than those around her. in the context of aggression, this scenario exemplifies: Determine which base will work to deprotonate each compound in an acid/base extraction. suppose this experiment were done on the moon, where the acceleration of gravity is approximately 1/6 of that on the earth. how would this change the frequency of the oscillation? The equation P = 6.31H + 41.5 can be used to predict the points earned P, buy a student on an organic chemistry final, based on the number of hours H, that he, or she studies. To earn 95 points on the final, how many hours does the model suggest someone should study? 1. assuming you only see one band on the control treatment. is this a normal result? what makes you think so? what happen if you see more than one band on the control treatment? Intrinsic motivation typically involves rewards such as prizes, titles, or praise. Question 6 options: True False