MYSQL
I need a query code I am confused with two questions
Display each classification that has a total of more than 70 parts on hand. List the classification and the total on hand as ‘More than 70’
What is the average quoted price, maximum quoted price, and minimum quoted price of all orders? Display the average as ‘Average Quoted Price’, maximum quoted price as ‘Maximum Quoted Price’, and minimum quoted price as ‘Minimum Quoted Price’. Extra decimal places are okay for now. Insert your snip of the query and resultset together here:

Answers

Answer 1

Using the knowledge in computational language in MYSQL it is possible to write a code that Display each classification that has a total of more than 70 parts on hand. List the classification and the total on hand as ‘More than 70’.

Writting the code:

CREATE TABLE shop (

   price   DECIMAL(16,2) DEFAULT '0.00' NOT NULL,

   PRIMARY KEY(article, dealer));

INSERT INTO shop VALUES

   (1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),

   (3,'C',1.69),(3,'D',1.25),(4,'D',19.95);

See more about MYSQL at brainly.com/question/20626226

#SPJ1

MYSQL I Need A Query Code I Am Confused With Two QuestionsDisplay Each Classification That Has A Total

Related Questions

Downloading what appears to be a legitimate app, a user installs malware which contains keylogging software. What type of breach is the downloading of malware?
CIA Traid -
explain

Answers

Downloading what appears to be a legitimate app, a user installs malware which contains keylogging software. The type of breach that this downloading of malware is  called option B: integrity.

What is CIA Traid about?

The CIA triad, also known as confidentiality, integrity, and availability, is a concept created to direct information security policies inside a company. To avoid confusion with the Central Intelligence Agency, the approach is sometimes frequently referred to as the AIC triad (availability, integrity, and confidentiality).

Note that In the event of a cyber breach, the CIA triad offers organizations a clear and thorough checklist to assess their incident response strategy. The CIA trio is particularly crucial for identifying vulnerability sources and aiding in the investigation of what went wrong once a network has been infiltrated.

Learn more about malware from

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

See full question below

Downloading what appears to be a legitimate app, a user installs malware which contains keylogging software. What type of breach is the downloading of malware?

answer choices

Confidentiality

Integrity

What percent of 2.5 hours decrease to 1 hour

Answers

Answer: 60% decrease

Explanation:

How to calculate percentage decrease:

Subtract starting value minus final value

Divide that amount by the absolute value of the starting value

Multiply by 100 to get percent decrease

If the percentage is negative, it means there was an increase and not an decrease.

Percentage Decrease Formula

You can use the percentage decrease formula for any percent decrease calculation:

Percentage Decrease=Starting Value−Final Value|Starting Value|×100

Example Problem: Percentage Decrease

You have a lamp with a 60-watt traditional light bulb. Your lamp uses 60 watts of electricity per hour. You're considering replacing the bulb with an LED light bulb that uses 8 watts of electricity per hour. What is the percentage decrease in the lamp's hourly energy use if you switch to an LED light bulb?

Percentage Decrease = [ (Starting Value - Final Value) / |Starting Value| ] × 100

60 - 8 = 52

52 / 60 = 0.8667

0.8667 × 100 = 86.67%

So if you switch to an LED light bulb your lamp will use 86.67% less energy per hour.

Related Calculators

Answer:

40%

Explanation:

Whenever we find "x" percent of a number, we simply multiply by "x/100", because "percent" just means "per 100".

We can divide the 2.5, by 100 to see how many "groups" of 100 are in 2.5, which gets us, 0.025.

Now we multiply this by some value, which will be our percent, to get "1"

So we have the equation: [tex]0.025 * x = 1[/tex]

Dividing both sides by 0.025 gives us: [tex]x=40[/tex]

so our percentage would be 40.

But generally whenever you solve these problems you convert the "percentage" to a "decimal" by dividing the percentage by 100.

So finding "x" percent of "a", can be calculated by: [tex]a*\frac{x}{100}[/tex]

and from here you would calculate the value with the givens.

Below you can see stringSize, which is implemented in Java

Answers

It will return correct values as it will iterate until the length is met (and therefore i is not less than s.length() but is equal to s.length). It is poorly designed as s.length() can be used directly to obtain the number of characters in a string. This function likely has a Big O notation greater than O(n) because - due to the unnecessary loop - it has to iterate again. It also increments size multiple times instead of mutating it once when the for loop is finished to reduce on read/write time

The sequence [tex]x_{n}[/tex] is defined, for n > 2, by the recursive formula

[tex]x_{n}[/tex] = [tex]2x_{n - 1}[/tex] + [tex]x_{n - 2}[/tex] where [tex]x_{1}[/tex] = 2 and [tex]x_{2}[/tex] = 3.

Write a program that first invites the user to input a natural number n. Then compute the n-th number in the sequence [tex]x_{n}[/tex] and display it appropriately to the user.

(The solution has to be in the Python programming language!)

Answers

Using the knowledge of the computational language in python it is possible to write a code that write a program that first invites the user to input a natural number n.

Writting the code:

def func(n):

   

   # Base cases:

   # When n reaches 1 then return 2 as X1 = 2.

   if(n == 1):

       return 2

   

   # When n reaches 2 then return 3 as X2 = 3.

   if(n == 2):

       return 3

     

   ans = 2 * func(n-1) + func(n-2)

      return ans

n = int(input("Enter a natural number: "))

print("The" ,n,"-th number of the sequence is: " ,func(n))

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

#SPJ1

Ask the user to think of a number between zero and one hundred. Your goal is to guess the number in as few guesses as possible. The user will inform you if you guessed too high, low or correct. Start by always guessing the middle number 50. If the user informs you it’s too low, then try 75. If 50 was too high, then try 25. Always guess the middle of the range of numbers left. In doing so, the range of numbers will be cut in half after each guess. If done correctly, no more than 7 guesses are needed. Print out “you cheated” if you reach 7 guesses and are still wrong.

Answers

A program in Python that asks the user to think of a number between zero and one hundred and tries to guess the number in as few guesses as possible is given below:

The Program

import random

import math

# Taking Inputs

lower = int(input("Enter Lower bound:- "))

# Taking Inputs

upper = int(input("Enter Upper bound:- "))

# generating random number between

# the lower and upper

x = random.randint(lower, upper)

print("\n\tYou've only ",

round(math.log(upper - lower + 1, 2)),

" chances to guess the integer!\n")

# Initializing the number of guesses.

count = 0

# for calculation of minimum number of

# guesses depends upon range

while count < math.log(upper - lower + 1, 2):

count += 1

# taking guessing number as input

guess = int(input("Guess a number:- "))

# Condition testing

if x == guess:

 print("Congratulations you did it in ",

  count, " try")

 # Once guessed, loop will break

 break

elif x > guess:

 print("You guessed too small!")

elif x < guess:

 print("You Guessed too high!")

# If Guessing is more than required guesses,

# shows this output.

if count >= math.log(upper - lower + 1, 2):

print("\nThe number is %d" % x)

print("\tBetter Luck Next time!")

Read more about python programming here:

https://brainly.com/question/26497128

#SPJ1

You wrote a pseudocode outline of your program using comments. Which character do you use to indicate a line is a comment? O # O/ O& O"​

Answers

It depends on the coding language but assuming you’re studying Python the correct way to comment is with # symbol

SMCS School has hired you to set up an Internet connection within the school premises. The Internet connection will be utilized by both the junior and senior sections of the school situated in two different buildings on the same campus. Which of the following types of networks will you install in this scenario?

Answers

The network that will be install in the school premises and will be utilized by both the junior and senior sections of the school situated in two different buildings on the same campus is CAN (Campus Area Network).

Different Type of Networks:

Option 1 : MAN

Metropolitan Area Network is used to set up an Internet connection within the city.

So, this is the wrong option.

Option 2: WAN

Wide Area Network is used to setup an internet connection over a state, province or country.

So, this is the wrong option.

Option 3: CAN

Campus area network is used to setup internet connection within a limited geographical area like school campus, university campus etc. Given scenario is, the Internet connection will be utilized by both the junior and senior sections of the school situated in two different buildings on the same campus. When internet connection is to be used within the campus i.e., between two or three buildings then campus Area Network must be used there.

So, this is the Correct answer.

Option 4: LAN

Local Area Network is used to setup internet connection over the smallest area such as one school building, college buliding but not within the overall campus.

So, this is the wrong option.

To know more about network, visit: https://brainly.com/question/1167985

#SPJ1

What is output by the following code? Select all that apply.

c = 0
while (c < 11):
c = c + 6
print (c)

Answers

When the above code is entered into the Python online compilers and run, the output is 12.

What is an online compiler?

An online compiler is a technology that allows you to build and run source code in a variety of computer languages online. For program execution, an online compiler is required. It translates the text-based source code into an executable form known as object code.

The print() function sends the specified message to the screen or another output device. The message can be a string or another object that is converted to a string before being shown on the screen.

Hence, where:

c = 0

while (c < 11):

 c = c + 6

print (c)

Output = 12

Learn more about compilers:
https://brainly.com/question/27882492
#SPJ1

Write a function so that the main() code below can be replaced by the simpler code that calls function MphAndMinutes ToMiles().
Original main):
int main()
double milesPerHour;
double minutesTraveled;
double hoursTraveled;
double milesTraveled;
cin >> milesPerHour;
cin >> minutesTraveled;
hoursTraveled minutesTraveled / 60.0;
milesTraveled - hoursTraveled * milesPerHour;
cout ‹< "Miles:
<< milesTraveled ‹‹ endl;
return 0;

Answers

#include <iostream>

double mph_and_minutes_to_miles(double mph, double min) {

   return mph*double(min/60);

}

int main(int argc, char* argv[]) {

   double imph, imin; std::cin>>imph>>imin;

   std::cout << "Miles: " << mph_and_minutes_to_miles(imph,imin) << std::endl;

   return 0;

}

Welcome to Gboard clipboard, any text that you copy will be saved here.​

Answers

Answer: Welcome to Gboard clipboard, any text you copy will be saved here.

Secure websites use technology that scrambles the information you send. This is known as
A. hacking.
B. encryption.
C. padlocking.
D. digital media.

Answers

Answer:

B. Encryption.

Explanation:

Encryption encrypts data so that it can not be understood if/when it is intercepted by a third party between the sender and the recipient.

For example, if you're encrypting via the keyword vanilla, and then sending an email to Bob saying "Hi Bob", it would get encrypted as something like Vjh D5xx. The recipient would then use the keyword vanilla to decrypt this message so they can read it as Hi Bob. Anyone who intercepts this wouldn't have the keyword, and would just see incoherent letters, numbers, and symbols that they couldn't make heads or tails of.

Secure websites use technology that scrambles the information you send. This is known as, Encryption. So, the correct option is B.

Given that,

Secure websites use technology that scrambles the information you send.

Since, Secure websites use encryption technology to scramble the information you send, ensuring that it remains secure and protected during transmission.

Encryption involves the use of mathematical algorithms to transform data into an unreadable format, making it extremely difficult for unauthorized parties to access or understand the information.

This is a fundamental method used to safeguard sensitive data on the internet.

So, Option B is true.

To learn more about Encryption visit:

https://brainly.com/question/30408255

#SPJ6

Write a java program to find the average of any three numbers.​

Answers

import java.util.Scanner;

public class JavaExample {

public static void main(String[] args)

{

Scanner scan = new Scanner(System.in);

System.out.print("Enter the first number: ");

double num1 = scan.nextDouble();

System.out.print("Enter the second number: ");

double num2 = scan.nextDouble();

System.out.print("Enter the third number: ");

double num3 = scan.nextDouble();

scan.close();

System.out.print("The average of entered numbers is:" + avr(num1, num2, num3) );

}

public static double avr(double a, double b, double c)

{

return (a + b + c) / 3;

}

}

The output is attached to the answer. You can also check it..

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

Answers

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

Design a flowchart or pseudocode for a program that accepts two
numbers from a user and displays one of the following messages: First
is larger, second is larger, and numbers are equal.

Answers

Using the knowledge in computational language in python it is possible to write the code that design a flowchart or pseudocode for a program that accepts two numbers from a user and displays

Writting the code:

firstNum=int(input("enter the firstNum "))

secondNum=int(input("enter the secondNum "))

First="First is larger"

Second="Second is large"

Equal="Numbers are equl"

if firstNum>secondNum:

print(First)

elif(secondNum>firstNum):

print(Second)

else:

print(Equal)

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

#SPJ1

What is output by the following code? Select all that apply.

c = 2




while (c < 12):

print (c)
c = c + 3

Answers

When the above code is run via a compiler, the output will be 5.

What is code in programming?

In computer programming, computer code is a set of instructions or a set of rules expressed in a specific programming language (i.e., the source code). It is also the name given to source code after it has been compiled and is ready to execute on a computer.

The print() method outputs the message supplied to the screen or another standard output device. The message can be a string or any other object, which will be transformed to a string before being displayed on the screen.

When the above code is correctly entered into the compiler and rightly indented, the output given is 5.

Learn more about compilers:
https://brainly.com/question/27882492

#SPJ1

when computer and communications are combined, the result is information and cominiations Technology (true or false)​

Answers

Answer: When computer and communication technologies are combined the result is Information technology.

Explanation: This is a technology that combines computation with high-speed data, sound, and video transmission lines. All computer-based information systems utilized by companies, as well as their underlying technologies, are referred to as information technology.

As a result, information technology encompasses hardware, software, databases, networks, and other electronic gadgets.

IT refers to the technological component of information systems, making it a subsystem of information systems.

Information systems, users, and administration would all be included in a broader definition of IT.

Many organizations rely on IT to support their operations, since IT has evolved into the world's primary facilitator of project activities. IT is sometimes utilized as a catalyst for fundamental changes in an organization's structure, operations, and management. This is because of the capabilities it provides for achieving corporate goals.

These competences help to achieve the following five business goals:

Increasing productivity,

lowering expenses,

improving decision-making,

improving customer interactions, and

creating new strategic applications.

One of the four function of Information.
Security
is called

Answers

Answer:

The basic tenets of information security are confidentiality, integrity and availability. Every element of the information security program must be designed to implement one or more of these principles. Together they are called the CIA Triad.

The 4 functions of Information Security:It protects the organisation's ability to function.It enables the safe operation of applications implemented on the organisation's IT systems.It protects the data the organisation collects and uses.It safeguards the technology the organisation uses.

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

Answers

It is to be noted that from network 192.168.43.0 255.255.255.224 the number of subnets and hosts available are 8 and 32 respectively. Out of the 32 hosts only 30 are usually usable.

What is a host in networking?

A computer or other device linked to a computer network is referred to as a network host. A host can function as a server, providing information resources, services, and programs to network users or other hosts. At least one network address is assigned to each host.

A computer network is a collection of computers that share resources that are located on or provided by network nodes. To interact with one another, the computers employ standard communication protocols across digital linkages.

So with regard to the above answer, note that by entering the data into an online IPv4 subnet calculator, we are able to arrive at the total number of:

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

Learn more about Subnets:
https://brainly.com/question/15055849
#SPJ1

least privilege meaning in cybersecurity

Answers

Answer:

It is where each system is designed so that it only has the permissions necessary to operate, nothing more.

Explanation:

This is done for security concerns, which is the whole reason for cybersecurity.

How is trust built?
Select all the correct options and click Submit.
Trust is built incrementally.
Trust is earned behaviorally.
Trust is built by spending a lot of time with people.
Trust is built by being pleasant and polite.

Answers

The trust is built by the following options:

Trust is built incrementally.Trust is earned behaviorally.Trust is built by spending a lot of time with people.

How trust is built?

Trust is built by spending much time with the people you are in contact with you have to observe the behavioral characteristics and notice the behavior accordingly. Most important characteristics to build trust: Honesty, Integrity, Transparency etc. Hence to conclude along with certain observance and characteristics trust is built. Consistency often leads to trust. We have the most faith in people who are always there for us, in good and bad times. Showing someone you're there to assist them on a regular basis is a great way to build trust.

To know more about trust please follow the link below:

https://brainly.com/question/11875869

#SPJ1

Tech A says that it is usually better to pull a wrench to tighten or loosen a bolt. Tech B says that
pushing a wrench will protect your knuckles if the wrench slips. Who is correct?

Answers

Tech A is correct because pulling a wrench to tighten or loosen a bolt secures it to the bolt threading, reducing the possibility of it slipping.

How to tighten nuts and bolts?

Place your socket on the wrench's head. To begin using your torque wrench, insert a socket that fits your nut or bolt into the torque wrench's head. If you have an extender or adaptor, you can insert it into the opening at the head instead.

Hand-tighten the nut or bolt until it catches the threading on the screw. Place the nut or bolt to be tightened over the threading for the screw or opening on your vehicle by hand. Turn the nut or bolt on the vehicle clockwise with your fingers until the threading on the screw catches. Turn the nut or bolt until it can no longer be turned by hand.

Place the wrench on top of the nut or bolt being tightened. Hold the torque wrench handle in your nondominant hand while the nut or bolt is set on the threading.

Tighten the nut or bolt by turning the handle clockwise. When the wrench starts clicking or stops moving, stop turning it.

To know more about wrench and bolts, kindly visit: https://brainly.com/question/15075481

#SPJ1

6.6 code practice question 2? 4 adjacent circles one

Answers

We have to create a program that draws an image of concentric circles with the help of canvas  and frame using python.

Codding strucute of the given problem:

import simplegui

def draw_handler(canvas):

  canvas.draw_circle((200, 130), 90, 5, "Green")

  canvas.draw_circle((200, 130), 70, 5, "Green")

  canvas.draw_circle((200, 130), 50, 5, "Green")

  canvas.draw_circle((200, 130), 30, 5, "Green")

  canvas.draw_circle((200, 130), 10, 5, "Green")

frame = simplegui.create_frame('Circle', 600, 600)

frame.set_canvas_background("White")

frame.set_draw_handler(draw_handler)

frame.start()

To know more about Python, visit: https://brainly.com/question/26497128

#SPJ1

Consider a 3x4 rectangular shape room. Four computers are located at the four
corners of the room. The HUB is placed on the center of the room. Calculate the
minimum length of cables required to connect the computers in a network in each of the
following topologies:
a) Bus topology
b) Ring topology
c) Star topology
d) Mesh topology

Answers

The minimum length of cables required to connect the computers in a network in each of the bus topology. Thus, option (a) is correct.

What is computers?

Computer is the name for the electrical device. In 1822, Charles Babbage created the first computer. The work of input, processing, and output was completed by the computer. Hardware and software both run on a computer. The information is input into the computer, which subsequently generates results.

According to givens the scenario was the justify are the 3×4 rectangular shape room there are the four computers are the set-up to the HUB is placed in the center of the room. The bus topology is the based on the networks are the subsequently.

As a result, the minimum length of cables required to connect the computers in a network in each of the bus topology. Therefore, option (a) is correct.

Learn more about on computers, here:

https://brainly.com/question/21080395

#SPJ2

Write the following short piece of code in python:

Answers

Programmers refer to a brief section of reusable source code, machine code, or text as a “snippet.” These are typically explicitly defined operational units that are integrated into bigger programming modules.

What are the short piece of code in python?

Guido van Rossum created Python, an interpreted, object-oriented, high-level programming language with dynamic semantics. It was first made available in 1991.

The syntax of Python is straightforward and resembles that of English. Python's syntax differs from various other programming languages in that it enables programmers to construct applications with fewer lines of code.

Therefore, Python operates on an interpreter system, allowing for the immediate execution of written code. As a result, prototyping can proceed quickly.

Learn more about python here:

https://brainly.com/question/10718830

#SPJ1

Implication if the intellectual property rights do not exist

Answers

Intellectual Property Rights (IPR) are  the creative rights over an original piece of work, invention or even an idea behind a business can come under the purview of Intellectual Property Rights Act.

Implication if the intellectual property rights do not exist

1.  Less research and development as nobody would reap benefits generated by their innovations.

2. Cultural and art vitality as they would not be made more according to their original work.

3. Job losses and economic issues as IPR helps in boosting both of these factors.

4. Healthcare and treatment would be at lost because of less innovation of useful vaccines.

5. Less emergence of startups with unique ideas, decline in innovative trade and a race backwards.

6. Counterfeiting of journals, research papers leading to a still situation.

Hence, these factors explain what would happen without IPR.

To know more about Intellectual property rights from the given link

https://brainly.com/question/24015145

#SPJ13

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

help help help help....​

Answers

Answer:redo reload copy cut paste bullet list highlight bold numbered list center right left.

Explanation:

That's all I can help with right now

Can someone help me out with a code. Code's in python write a function that returns the longest common prefix of two strings. For example, the longest
common prefix of distance and disinfection is dis. The header of the method is:
def prefix(s1, s2)
If the two strings have no common prefix, the method returns an empty string.
Write a main function that prompts the user to enter two strings and displays their common
prefix.
here's what I have currently but its not working.
def longestCommonPrefix(self, arr):

arr.sort(reverse = False)
print(arr)
n= len(arr)
str1 = arr[0]
str2 = arr[n-1]

n1 = len(str1)
n2 = len(str2)
result = ""
j = 0
i = 0

while(i <= n1 - 1 and j <= n2 - 1):
if (str1[i] != str2[j]):
break
result += (str1[i])

i += 1
j += 1

return (result)

Answers

Just 10 lines of code.

from functools import reduce

list = []

def compare():

   calc = [reduce(lambda a, b: a if a == b else None, x) for x in zip(*list)] + [None]

   return list[0][:calc.index(None)]

   

list.append(input("Enter the first string: "))

list.append(input("Enter the second string: "))

print(compare())

5. Define a procedure “DistanceBetweenTwoPoints” that will take four paramaters x1, y1, x2
and y2 and will calculate the distance between these two points using the formula
√((x2 – x1)² + (y2 – y1)²). You must use the SquareRoot function you defined previously.
[10 points]

Test case:
> (DistanceBetweenTwoPoints 2 5 3 2)
3.1622776601683795
Can anyone please help me to write this procedure in Scheme Language? I am stuck! Please help!

Answers

Using the knowledge in computational language in JAVA it is possible to write the code that define a procedure “DistanceBetweenTwoPoints” that will take four paramaters x1, y1, x2 and y2.

Writting the code:

package org.totalbeginner.tutorial;

public class Point {

   public double x;

   public double y;

   Point(double xcoord, double ycoord){

       this.x = xcoord;

       this.y = ycoord;

   }

   public double getX() {

       return x;

   }

   public double getY() {

       return y;

   }    

}

package org.totalbeginner.tutorial;

public class Line {

   double x;

   double y;

   Point p1 = new Point(2.0,2.0);

   Point p2 = new Point(4.0,4.0);

   Point mp = new Point(x,y);

   public void midpoint() {

       x = (p1.getX() + p2.getX()) / 2;

       y = (p1.getY() + p2.getY()) / 2;

   }

See more about JAVA at brainly.com/question/12975450

#SPJ1

Problem: A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours.

Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr * 40hrs) + ($30/hr * 20 hrs) = $800 + $600 = $1400 total.

For this assignment, you must create pseudocode and a flowchart to design a program that will calculate an employee’s weekly paycheck.

Write pseudocode to design a programming solution by outlining a series of steps and using appropriate indentation and keywords. As you write your pseudocode, be sure to consider the following:
What input does the computer need?
What steps does the program need to follow to process the input? What output should result?
When might you need to use decision branching? If you used decision branching, did you account for all possible input values?
Did you use appropriate indentation and keywords (such as IF, ELSE, CALCULATE, and so on) throughout your pseudocode?
Create a flowchart to design a programming solution by organizing a series of steps and using appropriate symbols and arrows. As you create your flowchart, be sure to use appropriate arrows and symbols for each of the following:
Start and end points
Input and output
Decision branching
Processing steps
Note: You may find the correct shapes to create your flowchart on the Insert menu in Microsoft Word. Or you may draw your flowchart by hand, take a clear picture, and insert the picture into your Word document. Use the add shapes or insert pictures tutorials to help you. You could also use a flowcharting tool that you are familiar with, such as Lucidchart, if you prefer.

Answers

Using the knowledge in computational language in pseudocode  it is possible to write a code that programming solution by outlining a series of steps and using appropriate indentation and keywords.

Writting the code:

h = int(input('Enter hours '))

rate = 20

if h <= 40:

   pay = h * rate

elif h > 40:

   pay = ((h-40) * rate * 1.5) + rate * 40

print("Your pay is %.2f" % pay)

Set hourly rate to 20

Input hours worked

If hours worked is under 40

   Compute hours worked times hourly rate equals pay

Else hours worked is over 40

   Compute ?

Endif

Print pay

See more about pseudocode at brainly.com/question/12975450

#SPJ1

Other Questions
ind the perimeter or circumference and area of each igure. Round to the nearest tenth. 4. 6. 2.5 cm 14 yd 2 cm 3.5 cm 3 cm 5. 7. 3 cm 4 ft 5 cm 4 cm The lengths in the diagram are in centimetres. The square (2x,2x) and the rectangle (10, x+8) have perimeters of the same length.a. Write an equation to show this. b. Solve the equation.c. Find the length of the rectangle. Which example is the weakest research question? A. Why has the price of a movie ticket gone up in the past decade?C B. How did movies become an integral part of pop culture?C. a Why are movies a popular form of family entertainment? D. Which movie series is better: StarWars or The Lord of the Rings? students were asked to name their favourite sport. seven students chose soccer , nine chose basketball , four chose baseball , and five chose tennis. write the ratio in simplest form that compares the number of students who chose tennis to the total number of students Which symbol correctly compares the fractions below? 2/3 ? 6/9A. >B. none of these are correct C. =D. The attendant at a parking lot compared the number of hybrid vehicles to the totalnumber of vehicles in the lot over a weekend. The ratios for the three days wereequivalent. Complete the table.Day Hybrids TotalFri.59Sat. 63Sun. 40 Enter your answer in each of the answer boxes.DayFri.Sat.Sun.Hybrids40Total63 PLS ANSWER THIS Solve the following system of equations for all three variables. The magnitude of the buoyant force is equal to the weight of fluid displaced by the object. Under what circumstances is this statement true?. aisha's parents are encouraged to visit her school to speak with her teachers about the progress she is making in all of her classes. the interaction between aisha's parents and teachers is an example of what system? What is the y-intercept of this line? hat is the function of major histocompatibility complex (mhc) proteins? they promote phagocytosis by binding to antigens. they facilitate antigen recognition by t cell receptors. they stimulate cell division. they trigger endocytosis of the antigen. when a consumer makes an online purchase directly through social media without using a company's website, it is considered blank . multiple choice question. mobile marketing social commerce showrooming webrooming Write as a single fraction in its lowest terms: 3(2x-1)/5 -2 (4x -2)/2 a high-pressure, fast-moving (more than 300 km/h) mixture of pyroclastic debris, including fragments and gas typically ejected vertically from a volcanic vent, is called Please help! I will award top rating for the first to help! (the questions are on the image)It needs to be fully simplified! The current on the Little River is 8 mph. Tom'sboat goes 15 mph in still water. How far upstreamcan Tom's boat go on the Little River in 1.5 hours?a) 12 milesb) 25 milesc) 10.5 milesd) 34.5 miles True or False. The theme is always explicitly stated in the text.O a. True, the author normally clearly states the themeb. True, the theme should always be the first sentences of a story.Oc. False, the theme is not needed in a storyO d. False, because the theme is usually a general statement that is implied What is the purpose of tRNA? Answer choices: A. It carries DNA to the ribosome. B. It contains a sequence of transcribed DNA out of the nucleus. C.It is the major part of the ribosome. D. It transfers amino acids to the ribosome during protein sysnthesis. Brainliest to first correct answer! Have a nice day^^ Ty two runners are jogging around a circular track with the same angular velocity. one runner is jogging with a speed v1 at a radius of 15 m and the second is jogging at a speed v2 at a radius of 18 m. what is the ratio of their linear speeds, v2/v1? A 7-meter roll of blue ribbon costs $12.04. What is the unit price?