Create a Python script that will compare two (2) numbers entered by the user. Refer to the attached image and to the following algorithm. There is no need to create a class similar to how Java works.

3.1. User enters the first number.
3.2. User enters the second number.
3.3. If the first number is less than, greater than, or equal the second number, a message is displayed.

Please Help me. Thank You!
Marry Christmas!​

Answers

Answer 1

x = int(input("Enter first number\n"))

y = int(input("Enter second number\n"))

if x > y:

   print(x, "is greater than", y)

elif x < y:

   print(x, "is less than", y)

else:

   print(x, "is equal to", y)

i'm not the greatest coder, but it works :)


Related Questions

what is a survey? plz hel​

Answers

Answer:

The act of seeing and recording information.

Answer:

a method of collecting data tell me if  i'm wrong or right plz

Explanation:

Tim Berners-Lee cultivated a way to interconnect and self-index data. He made a major contribution to the development of the Internet by creating _____.
A. graphic data
B. emoticons
C. the hyperlink
D. digital data

Answers

Answer: D. Digital data

A(n) __________ is a system where banks in the United States eventually figured out that they could print more __________ than the gold that they had in their vaults.

Answers

Based on the information given regarding money, the correct option will be fractional reserve; paper money.

It should be noted that in the United States, there are banking institutions that hold reserves which is simply the fraction of deposits of other banks.

The fractional reserve is equal to the fraction of the bank's deposit liabilities that are owed to customers.

Therefore, a fractional reserve is a system where banks in the United States eventually figured out that they could print more paper money than the gold that they had in their vaults.

Learn more about money on:

https://brainly.com/question/24556197

please write an Introduction on intrusion detection system and prevention system
PLEASE

Answers

Answer:

An Intrusion Detection System (IDS) is a system that monitors network traffic for suspicious activity and issues alerts when such activity is discovered. It is a software application that scans a network or a system for harmful activity or policy breaching. Any malicious venture or violation is normally reported either to an administrator or collected centrally using a security information and event management (SIEM) system. A SIEM system integrates outputs from multiple sources and uses alarm filtering techniques to differentiate malicious activity from false alarms.

what is the relationship between interrupt and buffer

Answers

Answer:

Operating systems have some code called an 'interrupt handler', which prioritises the interrupts and saves them in a queue. Buffers are used in computers as a temporary memory area, and they are essential in modern computers because hardware devices operate at much slower speeds than the processor.

C++
see attached file for quesion

Answers

The picture doesn’t load.

Please hurry, it's a test! 30 POINTS. :)
What computing and payment model does cloud computing follow?

Cloud computing allows users to_____ computing resources and follows the ______
payment model.

1. Buy, Own, Rent, Sell
2. pay-as-you-go, pay-anytime-anywhere, pay-once-use-multiple-times

Answers

1 own
2 pay anytime anywhere

Matching parentheses. An math expression may have a number of parentheses like (, ), [, ], { and }. Each openning parenthesis (, or [, or { must be macthed by a corresponding closing parenthsis ), or ] or }. For example, 12 { 34 / [ 6 * ( 55 - 10 ) / ( 100 20 ) ] } has matched pairs of parentheses, while 12 { 34 / ( 6 * ) ] } does not. Write a function to check whether an input math expression has matched parentheses. The header of the function is given as follows:
bool match( const char exp [ ], const int s);
The input math express is store in the char array exp, and the size of exp is s. It returns true if all parentheses are matched or false otherwise.

Answers

C++ Code

#include
using namespace std;

bool match(const char exp[],const int s)
{
// declare a character array to perform stack operations
char stack[s];

// declare top and initialize to -1 and flag to 0
int top=-1,i,flag=0;

// visit all characters in the expression string
for(i=0;i {
// if the character is [ or ( or { then push it into stack
if(exp[i]=='[' || exp[i]=='(' || exp[i]=='{')
{
top++;
stack[top]=exp[i];
}
// if the character is ] or ) or } then check conditions
else if(exp[i]==']' || exp[i]==')' || exp[i]=='}')
{
// check stack is empty or not
if(top!=-1)
{
// check all possible failure conditions
if(exp[i]==')' && (stack[top] == '{' || stack[top]=='['))
{
flag = 1;
break;
}
else if(exp[i]==']' && (stack[top] == '{' || stack[top]=='('))
{
flag = 1;
break;
}
else if(exp[i]=='}' && (stack[top] == '(' || stack[top]=='['))
{
flag = 1;
break;
}
top--;
}
else
{
flag=1;
break;
}
}
}
// after visiting all characters of expression string check if stack is not empty and flag is 1. if any one of the condition is true return false. otherwise return true

if(top>=0 || flag==1)
return false;
else
return true;
}

int main()
{

// declare character array to store expression
char exp[10000];
cout<<"Enter an Expression"<
// read expression from user
cin.getline(exp, 10000);
int s=0;

// find the length of the expression string
for(int i=0;exp[i]!='\0';i++)
{
s++;
}

// call the match function
bool status = match(exp,s);

// print the result based on value returned by match() function
if(status == 1)
cout<<"true"< else
cout<<"false"<
}


Sample Input/Output is attached

When defining a system
landscape, the following are all
necessary to operate the ERP
system,
except
Select one:
O a. Techincal expertise.
O b. Computer hardware.
O c. Networking hardware.
O d. None of the above.
O e. All of the above.

Answers

All of the given answer options are necessary to operate the enterprise resource planning (ERP) system when defining a system  landscape.

Enterprise resource planning (ERP) can be defined as a business strategy process through which business firms manage and integrate the main parts of their day-to-day business activities by using software applications.

The main objective and purpose of an enterprise resource planning (ERP) system is to significantly reduce costs by integrating all the operations of a business firm.

In Computer science, when defining a system  landscape, all of the following are necessary to operate the enterprise resource planning (ERP) system:

Technical expertiseComputer hardwareNetworking hardware

Read more on ERP system here: https://brainly.com/question/25752641

Which meter would you use to determine which lamp is defective in the shortest possible time? Explain how you would use this meter and why.

Answers

Answer:

bla bla bla bla

Explanation:

I dont anther stand

Meenakshi has created a presentation of six slides. The slides have the same background, but s wants to change the background of each slide. Which option can help her in doing so?​

Answers

Ans:- Using Background Styles button present in Background group on the Design tab.

What is the result of the following code?

x=7//2+10%2**4

print(x)

Answers

Answer:

3

Explanation:

We can split the expression into two sections

First Section:

7 // 2 = 3. Using the floor division we only utilize the integer part.

Second Section:

10 % 2**4 = 0**4 = 0

Bringing back the full version expression we have

3 + 0 = 3



List and explain three ways study groups benefit your learning.

Answers

Answer:

Studying in groups can have many effective outcomes and be beneficial. Here are some ways studying in a group is benefical,

1.  More support, limits chances of procrastination

     With many people, everyone is assigned a role or there is more determination by all peoples to get the work done than an individual being the only one responsible than many trying to accomplish the completion of the project.

2. More people means more parts can get done effectively and taking notes is easier.

     More people allow the work (depending on the project of assignment) for the work to get more focused and worked on faster with the designated roles given.

3. More interactive and allows (sometimes an enjoyable times) and to even learn faster than independently.

      People, not all however, might like the company, there's support and even people skills is enhanced by being in the group.

You are given an array of integers. Your task is to create pairs of them, such that every created pair has the same sum. This sum is not specified, but the number of created pairs should be the maximum possible. Each array element may belong to one pair only.

Write a function

class Solution public int
solution (int[] A); }

that, given an array A consisting of N integers, returns the maximum possible number of pairs with the same sum.

Examples:
1. Given A = [1, 9, 8, 100, 2], the function should return 2. The pairs are (A[0]. A[1]) and (A[2], A[4]); the sum of each pair is 10.
2. Given A = [2, 2, 2, 3], the function should return 1. Although, for instance, A[0]+A[1] = A[0]+A[2], the pairs (A[0], A[1]) and (A[0], A[2]) cannot exist at the same time, because they both contain a common element, A[0].

Answers

Complete PYTHON code with explanation:

def solution(nums):

# form a dictionary which will store

# the possible pair's sum as key and the indexs used for the sum

sumAndpair = {}

# for every element in list nums

for i in range(len(nums)):

# iterate on all the element to the right of current element

for j in range(i+1,len(nums)):

# calculate the sum of current 2 elements

sum = nums[i] + nums[j]

# if the sum is already in the dictionay

if sum in sumAndpair:

# check if the current index have already been used

# if yes, then continue to next iteration

# this will make sure that same number have not been used more than once

if i in sumAndpair[sum] or j in sumAndpair[sum]:

continue

# if no, then append the current i and j to the value of current sum

else:

sumAndpair[sum].append(i)

sumAndpair[sum].append(j)

# if the current sum is not in the dictionary

# add the sum as key with a list of index used

else:

sumAndpair[sum] = [i, j]

# copmpute the maximum possible number of pairs with the same sum

# which will be the maximum length value out of all the possible sum

# this maximum length will be divided by 2, since a pair of i, j contrinute to one sum

maxLength = 0

for key, value in sumAndpair.items():

if maxLength

Apart from using secure networks, how else can Dhruv keep his deliverables safe in the office and on the go? Select all that apply.

Answers

It should be noted that data can be secured when working in the following way:

Establishing a cyber security policy.Using two-factor authentication.Keeping passwords strong.Using secure internet connections.

Your information is incomplete. Therefore, an overview relating to the topic will be given. It should be noted that as telecommuting becomes a standard practice, the challenge regarding data security increases.

Employers should educate their employees about data security. The workers should know that data security is a priority and that all the internet connections are secure.

Learn more about data security on:

https://brainly.com/question/10091405

what is office course
how to learn office course

Answers

Answer:

It includes Word, to create, polish, and share documents; Excel, to analyze and visualize data; PowerPoint, to create, collaborate, and effectively present ideas; OneNote, to organize ideas into a digital notebook; Outlook, to organize email, coordinate schedules, and stay up to date with contacts; Access, to create .

Hope this helps you XD ✌️

So has anyone opened the link/file those people are giving out as answers? Like what are they, viruses, answers, nothing??? Someone that has opened one tells me what it was and what happened because I am to scared to open it.

Answers

Answer:

They're viruses that why they answer so quick and get deleted quickly


Which statement, if any, about Boolean is false?
a. They are all true.
b. Boolean is one of the four data types.
c. All expressions in python have a Boolean value.
c. The Boolean values are True and False.

Answers

Answer:

A.

Explanation:

Every device connected to the public Internet is assigned a unique number known as: a. an Internet Protocol (IP) addres

Answers

Answer:

yes

Explanation:

its the number used to identify the devise connected to the internet

Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in StudentInfo.tsv. Assume the number of students is at least 1 and at most 20.
The program performs the following tasks:
Read the file name of the tsv file from the user.
Open the tsv file and read the student information.
Compute the average exam score of each student.
Assign a letter grade to each student based on the average exam score in the following scale:
A: 90 = < X o
B: 80 = < x < 90
C: 70 = < X < 80
D: 60 = < x < 70
E: X < 60
• Compute the average of each exam.
• Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one student per row and separate the values with a tab character.
• Output the average of each exam, with two digits after the decimal point, at the end of report.txt. Hint: Use the setprecision manipulator to format the output.
Ex: If the input of the program is:
StudentInfo.tsv
and the contents of StudentInfo.tsv are: 70 45 59
Barrett Edan 96 97 88
Bradshaw Reagan 73 94 80
Charlton Caius 88 61 36
Mayo Tyrese 90 86 45
the file report txt should contain
Barrett Edan 70 45 59 F
Baadha Boagan 9e 157 89 A
Charlton Caius 73 94 80 B
Mayo and Tyrese 58 61 36 D
Stern and Brenda 90 36 45 C
Average midterm 83.40, midterm2 76.60, final 61.60

Answers

#include
#include
#include
#include
#include
#include


using namespace std;

// Class student required to store the data
class Student{
public:
string lname;
string fname;
int marks[3];
char grade;

// Function which generates the grade for student
void calculate_grade(){
double sum = 0;
for(int i=0;i<3;i++){
sum+= marks[i];
}
double average = sum/3;
if(average>=90 && average<100)
this->grade = 'A';
else if(average>=80)
this->grade = 'B';
else if(average>=70)
this->grade = 'C';
else if(average>=60)
this->grade= 'D';
else this->grade = 'F';
}
};

// This function reads the file , and creates a vector of Students data
vector read_file(string fileName){

// Opening the file
fstream fin;
fin.open(fileName);


// Temp variables
vector list;
vector row ;
string line, word, temp;

// Read the data into vector
while(getline(fin,line)){
row.clear();
stringstream s(line);

while(getline(s,word,'\t')){

row.push_back(word);

}
Student st;
st.fname = row[0];
st.lname = row[1];
st.marks[0] = stoi(row[2]);
st.marks[1] = stoi(row[3]);
st.marks[2] = stoi(row[4]);
st.calculate_grade();
list.push_back(st);
}
fin.close();
return list;
}

// This function takes filname to be output as input, and list of student
void writeFile(string filename, vector list){

// Opening the new file
ofstream fin(filename);
for(int i=0;i string line = list[i].fname+"\t"+list[i].lname+"\t"+to_string(list[i].marks[0])+"\t"
+to_string(list[i].marks[1])+"\t"+to_string(list[i].marks[2])+"\t"+list[i].grade+"\n";
fin<
}


// Find the stats required
double average1 =0,average2 =0 ,average3 = 0;
for(int i=0;i average1+=list[i].marks[0];
average2+=list[i].marks[1];
average3+=list[i].marks[2];
}
average1/=list.size();
average2/=list.size();
average3/=list.size();

// Writting the stats
fin<<"\n"<<"Average: "<<"mid_term1 "<
// Closing the file
fin.close();
}
int main(){

// Taking the input
cout<<"Enter the filename: ";
string filename;
cin>>filename;
vector list;

// Reading and Writting to the file
list = read_file(filename);
writeFile("report.txt",list);


}

In this exercise we have to use the knowledge of the JAVA language to write the code, so we have to:

The code is in the attached photo.

So to make it easier the code can be found at:

using namespace std;

// Class student required to store the data

class Student{

public:

string lname;

string fname;

int marks[3];

char grade;

// Function which generates the grade for student

void calculate_grade(){

double sum = 0;

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

sum+= marks[i];

}

double average = sum/3;

if(average>=90 && average<100)

this->grade = 'A';

else if(average>=80)

this->grade = 'B';

else if(average>=70)

this->grade = 'C';

else if(average>=60)

this->grade= 'D';

else this->grade = 'F';

}

};

// This function reads the file , and creates a vector of Students data

vector read_file(string fileName){

// Opening the file

fstream fin;

fin.open(fileName);

// Temp variables

vector list;

vector row ;

string line, word, temp;

// Read the data into vector

while(getline(fin,line)){

row.clear();

stringstream s(line);

while(getline(s,word,'\t')){

row.push_back(word);

}

Student st;

st.fname = row[0];

st.lname = row[1];

st.marks[0] = stoi(row[2]);

st.marks[1] = stoi(row[3]);

st.marks[2] = stoi(row[4]);

st.calculate_grade();

list.push_back(st);

}

fin.close();

return list;

}

// This function takes filname to be output as input, and list of student

void writeFile(string filename, vector list){

// Opening the new file

ofstream fin(filename);

for(int i=0;i string line = list[i].fname+"\t"+list[i].lname+"\t"+to_string(list[i].marks[0])+"\t"

+to_string(list[i].marks[1])+"\t"+to_string(list[i].marks[2])+"\t"+list[i].grade+"\n";

fin<

}

// Find the stats required

double average1 =0,average2 =0 ,average3 = 0;

for(int i=0;i average1+=list[i].marks[0];

average2+=list[i].marks[1];

average3+=list[i].marks[2];

}

average1/=list.size();

average2/=list.size();

average3/=list.size();

// Writting the stats

fin<<"\n"<<"Average: "<<"mid_term1 "<

// Closing the file

fin.close();

}

int main(){

// Taking the input

cout<<"Enter the filename: ";

string filename;

cin>>filename;

vector list;

// Reading and Writting to the file

list = read_file(filename);

writeFile("report.txt",list);

}

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

Where is the option to set Conditional Formatting rules found?
O Insert tab in the Formatting group
O Page Layout tab in the Styles group
O Home tab in the Styles group
Formulas tab in the Formatting group

Answers

The answer is: C - Home tab in the Styles group.

Answer:

C

Explanation:

the person above me is correct, you should mark them brainliest

b) What is system software? Write its importance.​

Answers

Answer:

System software is software designed to provide a platform for other software. Examples of system software include operating systems like macOS, Linux, Android and Microsoft Windows, computational science software, game engines, search engines, industrial automation, and software as a service applications.

Explanation:

Explain if a company is responsible for using computer components manufactured using fair trade practices. [9 marks]

Answers

Answer:

Fair trade practices aims at promoting the fair relationships between the buyers and producers. It is a kind of a social movement that makes the producers to provide the better conditions and humane working environment in case of developing countries.

• It also favors and supports the proper and substantial payment to the manufacturers and wages to the labors.

• It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

Explanation:

can you mark me as brainlist

Answer:

It is a trading partnership that states the manufacturers to analyze and check their supply sources or resources and provide disclosure if the materials were produced or mined in the areas of conflict or areas of extreme poverty.

x = 9 % 2

if (x == 1):
  print ("ONE")
else:
  print ("TWO")

Answers

The output will be : ONE

Answer:

Hewo There!!

_______________________

Simplify  9 %  ⋅  2 .

x = 0.18

_______________________

“One’s life has value so long as one attributes value to the life of others, by means of love, friendship, indignation and compassion.” — Simone De Beauvoir

_______________________

Think of life as a mytery because well it sort of is! You don't know what may happen may be good or bad but be a little curious and get ready for whatever comes your way!! ~Ashlynn

challenge encountered ​

Answers

Answer:

What challenge?

Explanation:

a
2 A car is fitted with the latest GPS navigation system. This device is controlled
by an embedded system in the form of a microcontroller.
Describe the inputs needed by the embedded system and describe which
outputs you would expect it to produce.
b Since updates to the GPS device are required every six months, explain how
the device is updated without the need to take the car to the garage every six
months.

Answers

Answer:

It probaly connected to the internet in some way to resieve updates

Hope This Helps!!!

list different examples of models​

Answers

Answer:

Planet 3D model

Chemical reactions on a computer simulation

Flowchart of how science has changed over time

Tectonic plate movement in a drawing or picture

Making an Atom cake (i've done it and it was fun)

Earth foam Structure with a quarter or it cut out to show the inside

Arrange the following steps in an appropriate order for program execution:
- Step A: translates the source code into the target machine code
- Step B: preprocesses the source code
- Step C: writes the source code
- Step D: links object code to other library files
Which one is correct:
A) D, C, B, A
B) C, A, D, B
C) A, B, C, D
D) C, B, A, D

Answers

The best arrangement of the following steps in an appropriate order for program execution is:

D) C, B, A, D

According to the given question, we are asked to give the best arrangement of the following steps in an appropriate order for program execution

As a result of this, we can see that when a person is writing a code, he would have to first write the source code, then preprocess it, before he translates it into the target machine code before finally linking the object code to other library files

Therefore, the correct answer is option D

Raad more about source code here:

'https://brainly.com/question/4593389

Write a program to repeatedly read integers from the standard input until it reads "-1" and exits. For each number before "-1," if it is positive and odd, do the following:

Answers

Answer:

#include <stdio.h>  

int main() {  

int p=0, n=0, z=0, inp=0;  

printf("How do I write a C program to read numbers until -1 "  

 "is encountered and also count the number of positive, negative, "  

 "zeroes encountered by users using a while loop?\n\n\n");  

printf("Enter an integer  (-1 to quit): ");  

scanf("%d",&inp);  

while(inp != -1) {  

 if(inp > 0) p++;  

 else if(inp < 0) n++;  

 else z++;  

 printf("\nEnter next integer (-1 to quit): ");  

 scanf("%d",&inp);  

}  

n++; /* -1 is also a -ve number */  

printf("You have entered ...\n");  

printf("\t\tPositive numbers: %d\n",p);  

printf("\t\tNegative numbers: %d\n",n);  

printf("\t\t          Zeroes: %d\n",z);  

}

Explanation:

What is it called when a unique letter is assigned to a shared drive

Answers

Answer:

Assigning a drive letter to a network drive is called mapping the drive, or linking the drive, by network nerds.

Explanation:

Other Questions
what does the prefix im mean in the word impatient Select a passage from Chapters 21-25 that uses connotative meanings of words. Discuss what the connotative meanings are and what effect they have on the themes of the text. Answers should be at least 150 words. An investor has an account with stock from two different companies. Last year, his stock in Company A was worth $6600 and his stock in Company B was worth $3500. The stock in Company A has increased 7% since last year and the stock in Company B has increased 1%. What was the total percentage increase in the investor's stock account? Round your answer to the nearest tenth (if necessary). pls asap what words from chapter 7 do the tuck family use to explain their immortality??? Is metal defined as an element or as a compound or as a material? IS THIS CORRECT OR NO??? WILL GIVE BRAINLIEST!!Which statement best explains the effectiveness of this introduction paragraph? Over 150 million people use the social media photo application SnapShot. Because this computer application boasts such a high number of users, I believe our school should allow our teachers to use this widely loved photo app in their lessons. A. The introduction is effective because the first sentence helps make the main idea of the essay seem important and fascinating B. The introduction is effective because it establishes credibility by stating the author's intentions C. The introduction is ineffective because it does not clearly explain the author's point of view D. The introduction is ineffective because the background information does not support the main idea Create a scatterplot displaying the data in the table. Be sure to include a linear trend line. (2 points) In a series of five albums called The Art of the Trio, the pianist ____________ brought a powerfully meditative approach to pop standards, jazz, classics, and original pieces. he map shows latitudes and longitudes for the state of North Carolina.Which North Carolina city is located at approximately 36.0 N, 78.9 W? Which expression can be used to approximate the expression below, for all positive numbers a, b, and x, where a Not-equals 1 and b Not-equals 1? log Subscript x Baseline x StartFraction log Subscript b Baseline x Over log Subscript b Baseline a EndFraction StartFraction log Subscript b Baseline a Over log Subscript b Baseline x EndFraction StartFraction log Subscript a Baseline b Over log Subscript x Baseline b EndFraction StartFraction log Subscript a Baseline x Over log Subscript b Baseline x EndFraction. A tree cast a shadow 21 meters long The angle of elevation for the sun is 51 degrees What is the height of the tree? Select the correct answer.A pencil costs $0.25 more than an eraser. If the cost of eight pencils is $6.80, what is the cost of one eraser?A. $1.80B. $0.85C. $0.60D. $0.40E. $0.30 Is oxygen ionic or molecular what was the population of santa claus indiana in 2010 Individuals who have diseases that result in the malabsorption of ________ are at risk for a vitamin D deficiency. A 300 g ball swings in a vertical circle at the end of a 1.3-m-long string. When the ball is at the bottom of the circle, the tension in the string is 13 N.What is the speed of the ball at that point? Ida is constantly looking for love and acceptance from friends and lovers. She has a strong drive to seek these things out due to her basic anxiety which resulted from inadequate parenting during early childhood. Horney would call Ida's approach: A jet can carry up to 200,000 liters of fuel.it used 130,000 liters of fuel during a flight. What percentage of the fuel capacity did it use on this flight if the discriminant is negative how many solutions are there