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
Pachacha [2.7K]
3 years ago
13

Create a Python script that will compare two (2) numbers entered by the user. Refer to the attached image and to the following a

lgorithm. 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!​
Computers and Technology
1 answer:
Anna007 [38]3 years ago
6 0

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 :)

You might be interested in
Hey IM new uh what is this?
viva [34]
It’s an app where you can ask questions and get other people’s opinions on them. It’s basically cheating if ur doing classwork.
3 0
3 years ago
Write a (java) program with a class called Sum1, using a while loop to add 10 numbers entered from the key-board.
Ainat [17]

This is a java program with a class called Sum1.

Explanation:

While loop is used to add 10 number.

import java.util.Scanner;

public class Sum 1

{

   public static void main(String args[])

   {

       int number, count, sum = 0;

       Scanner s = new Scanner(System.in);

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

       number = s.nextInt();

       while(number > 0)

       {

           count = number % 10;

           sum = sum + n;

           number = number / 10;

       }

       System.out.println("Sum of Digits:"+sum);

   }

}

5 0
3 years ago
A bowl contains 20 candies; 15 are chocolate and 5 are vanilla. You select 5 at random. What is the probability that all 5 are c
Sindrei [870]

Answer: 0.1937

Explanation:

Given : A bowl contains 20 candies; 15 are chocolate and 5 are vanilla.

If we select 5 candies, then the number of ways to select them is given by permutations.

The number of ways to select 5 candies is given by :-

^{15}P_5=\dfrac{15!}{(15-5)!}=\dfrac{15\times14\times13\times12\times11\times10!}{10!}=360360

The number of ways of selecting any 5 candies out of 20:-

^{20}P_5=\dfrac{20!}{(20-5)!}\\\\=\dfrac{20\times19\times18\times17\times16\times15!}{15!}\\\\=1860480

Now, the probability that all 5 are chocolate :-

=\dfrac{360360}{1860480}=0.193691950464\approx0.1937

Hence, the probability that all 5 are chocolate =0.1937

5 0
4 years ago
Read 2 more answers
A working model of a new product for testing purposes.
kotykmax [81]
Prototype is a working model for a product only for  testing purposes
6 0
3 years ago
Procter &amp; Gamble regularly monitors trends and information posted about their products and brands by consumers on several We
Shkiper50 [21]

Answer:

The correct answer to the following question will be "Web tracking".

Explanation:

This is indeed a business operation to keep an eye on the subscribers or visitors to the business. So what web trackers do is much more than that. They check up on your web activity.

A tracker generally seems to be a database script programmed to extract sets of data on your interests and how you are when you communicate through their database.

There are four types of Web trackers such as:

  • Embedded scripts.
  • Cookies.
  • Finger printers.
  • Supercookies.

3 0
3 years ago
Other questions:
  • What symbol following a menu command lets you know that a dialog box will be displayed?
    14·1 answer
  • What does the e in email stand for
    8·2 answers
  • In __________ write, the data are stored in the cache, and control returns to the caller. Select one: a. a synchronous b. a buff
    8·1 answer
  • Which tag provides information about a web site?
    12·1 answer
  • Graphic Designer A says that a halftone is an image created from a photograph and is comprised of a
    8·2 answers
  • 1. Before operating any power tool, you need to
    14·1 answer
  • 9 Which of these words is used to begin a conditional statement? ​
    8·1 answer
  • Draw algorithm and flowchart of multiply A and B​
    10·1 answer
  • Question 3 of 10
    14·1 answer
  • Q.3.1 Explain why devices on a network need addresses. (5)​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!