1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kisachek [45]
3 years ago
15

In Python

Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
5 0

Answer:

x=input("Please enter a decimal number: "); y=input("Please enter another decimal number: "); print("The sum of the numbers is: " + (x+y) + ".")

You might be interested in
Create a Java program with threads that looks through a vary large array (100,000,000 elements) to find the smallest number in t
olchik [2.2K]

Answer:

See explaination

Explanation:

import java.util.Random;

public class Sample{

static class MinMax implements Runnable{

int []arr;

int start,end,min,max;

MinMax(int[]arr, int start,int end){

this.start=start;

this.end=end;

min=Integer.MAX_VALUE;

max=Integer.MIN_VALUE;

this.arr=arr;

}

atOverride

public void run() {

for(int i=start;i<=end;i++){ //search min and max form strant to end index

min=Math.min(min,arr[i]);

max=Math.max(max, arr[i]);

}

}

}

public static void main(String[] args) throws Exception{

long beginTime = System.nanoTime();

Random gen = new Random();

int n=100000000;

int[] data = new int[n]; //generate and fill random numbers

for(int i = 0; i < data.length; i++) {

data[i] = gen.nextInt()%1000000;

}

long endTime = System.nanoTime();

System.out.println("Done filling the array. That took " + (endTime - beginTime)/1000000000f + " seconds.");

//-----------------------------------------

System.out.println("Using 1 thread"); //1 thread

MinMax m1=new MinMax(data,0,n-1); //class object

Thread t1=new Thread(m1); //new thread

beginTime=System.nanoTime(); //start timer

t1.start(); //start thread

t1.join(0); //wait until thread finishes

endTime=System.nanoTime(); //end timer

System.out.println("Min,Max: "+m1.min+","+m1.max); //print minimum and maximum

System.out.println("Time using 1 thread " + (endTime - beginTime)/1000000000f + " seconds."); //print time taken

//-----------------------------------------

System.out.println("Using 2 thread");

m1=new MinMax(data,0,n/2);

MinMax m2=new MinMax(data,n/2+1,n-1);

t1=new Thread(m1);

Thread t2=new Thread(m2);

beginTime=System.nanoTime();

t1.start();

t2.start();

t1.join(0);

t2.join(0);

endTime=System.nanoTime();

System.out.println("Min,Max: "+ Math.min(m1.min,m2.min)+","+Math.max(m1.max,m2.max));

System.out.println("Time using 2 thread " + (endTime - beginTime)/1000000000f + " seconds.");

//-----------------------------------------

System.out.println("Using 3 thread");

m1=new MinMax(data,0,n/3);

m2=new MinMax(data,n/3+1,2*n/3);

MinMax m3=new MinMax(data,2*n/3+1,n-1);

t1=new Thread(m1);

t2=new Thread(m2);

Thread t3=new Thread(m3);

beginTime=System.nanoTime();

t1.start();

t2.start();

t3.start();

t1.join(0);

t2.join(0);

t3.join(0);

endTime=System.nanoTime();

System.out.println("Min,Max: "+ Math.min(Math.min(m1.min,m2.min),m3.min)+","+Math.max(Math.max(m1.max,m2.max),m3.max));

System.out.println("Time using 3 thread " + (endTime - beginTime)/1000000000f + " seconds.");

//-----------------------------------------

System.out.println("Using 4 thread");

m1=new MinMax(data,0,n/4);

m2=new MinMax(data,n/4+1,2*n/4);

m3=new MinMax(data,2*n/4+1,3*n/4);

MinMax m4=new MinMax(data,3*n/4+1,n-1);

t1=new Thread(m1);

t2=new Thread(m2);

t3=new Thread(m3);

Thread t4=new Thread(m4);

beginTime=System.nanoTime();

t1.start();

t2.start();

t3.start();

t4.start();

t1.join(0);

t2.join(0);

t3.join(0);

t4.join(0);

endTime=System.nanoTime();

System.out.println("Min,Max: "+ Math.min(Math.min(m1.min,m2.min),Math.min(m3.min,m4.min))+","+Math.max(Math.max(m1.max,m2.max),Math.max(m3.max,m4.max)));

System.out.println("Time using 4 thread " + (endTime - beginTime)/1000000000f + " seconds.");

}

}

6 0
3 years ago
Which relation is created with the primary key associated with the relationship or associative entity, plus any non-key attribut
konstantin123 [22]

Answer:

- Transform binary or unary M:N relationship or associative entity with its own key.

Explanation:

Transform binary relation is described as the method through which a decimal can easily be converted into binary while the unary relationship is described as a relationship in which both the two participants occurs from the same entity.

In the given case, 'transform binary or unary M:N relationship' can be created using 'the primary key linked with the relationship plus any non-key aspects of the relationship and the primary keys of the related entities' as it displays the existence of a relationship between the occurrences of a similar set of the entity i.e. associative entity here.

5 0
4 years ago
Plzzzz help me
Art [367]

Answer:

Answered below

Explanation:

Carpal tunnel syndrome is a disease which occur as a result of pressure on the median nerve supplying the hand. The median nerve passes under the carpal tunnel, which is a band of tendons at the wrist, and gets compressed.

Causes include;

Excessive, prolonged, repetitive typing, diabetes, obesity, arthritis.

Symptoms include;

Numbness of the hand, weakness of the hand, inability to grasp, tingling sensations on the parts of the hand affected.

6 0
3 years ago
Hi question
lapo4ka [179]

Answer:

I believe it's 20% I could be wrong just thinking of it many teenagers don't really come out and say anything and are too afraid to tell anyone by possibly being wrong or putting themselves into more danger

6 0
3 years ago
Why do people yeet yeet and ree
DiKsa [7]

Answer:

Cause they are trying to be annoying

Explanation:

Something is wrong with them :)

8 0
3 years ago
Read 2 more answers
Other questions:
  • Network firewall entry and exit points are called
    6·1 answer
  • How have computers changed overtime
    13·2 answers
  • Which software application can best help teachers determine their students' average grades?
    5·2 answers
  • Which education level has the highest return on investment (ROI)? AHigh School Diploma BROI is equal for all of the above. CSeni
    6·1 answer
  • What is an optical storage device?
    7·2 answers
  • Is LTE faster than 4G?
    8·1 answer
  • List four useful spreadsheet functions and explain what they do.
    11·1 answer
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • What do we call exceptions to the exclusive rights of copyright law?
    14·1 answer
  • A ……………………………is used to verify the identity of a website and is issued to the owner of the website by an independent and recogni
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!