Question

n1 = int(input("Enter first number: ")) n2 = int(input("Enter second number: ")) n3 = int(input("Enter third...

n1 = int(input("Enter first number: ")) n2 = int(input("Enter second number: ")) n3 = int(input("Enter third number: ")) smallest = n1 if n2 < smallest: smallest = n2 if n3 < smallest: smallest = n3 print("smallest number is", smallest) Now, how can you find if any are equal and print?

0 0
Add a comment Improve this question Transcribed image text
Answer #1
n1 = int(input("Enter first number: "))
n2 = int(input("Enter second number: "))
n3 = int(input("Enter third number: "))
smallest = 3 if (n1 == n2) and (n1 == n3) else 2 if (n1 == n2) or (n1 == n3) else 1
print("smallest number is", smallest)

Add a comment
Know the answer?
Add Answer to:
n1 = int(input("Enter first number: ")) n2 = int(input("Enter second number: ")) n3 = int(input("Enter third...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Problem 4 (20pts). A transformer with N1, N3 turns at the input and N2, N4 turns...

    Problem 4 (20pts). A transformer with N1, N3 turns at the input and N2, N4 turns at the output is wrapped as drawn. The magnetic flux in the core is given as Q = -20sin(wt) (Wb), and Ry = 1k1. Find: a) V2, V3 and 12, 13. b) Direction of I2, I3. c) What is Rin? N2=600 N2=300 Nz=100 N4=300 1 12 Iz Rin RL WW V V2 V3 Ri=100012

  • If n1, n2, n3, n4, etc. represent the number of cycles at specific overstress levels; and...

    If n1, n2, n3, n4, etc. represent the number of cycles at specific overstress levels; and N1, N2, N3, and N4 etc. represent the life in cycles at these overstress levels, and taken from the appropriate S-N curves, write down the expression in terms of fatigue damage due to fatigue cycling derived by “Palmgren and Miner” law.

  • Problem 4 (20pts). A transformer with N1, N3 turns at the input and N2, N4 turns...

    Problem 4 (20pts). A transformer with N1, N3 turns at the input and N2, N4 turns at the output is wrapped as drawn. The magnetic flux in the core is given as Q = -20sin(wt) (Wb), and R, = 1k.. Find: a) V2 V3 and 12, 13. b) Direction of 12, 13. c) What is Rin? N=600 N2=300 Nz=100 N=300 12 13 Rin RL V V2 V3 R -100082

  • Create a 4-bit prime number detector. The circuit has four inputs---N3, N2, N1, and N0--- that...

    Create a 4-bit prime number detector. The circuit has four inputs---N3, N2, N1, and N0--- that corresponds to a 4-bit number (N3 is the most significant bit) and one output P that is 1 when the input is a prime number and that is 0 otherwise. Apply Sequential Circuit Counter using a JK Flip flop in the application and construct its circuit.

  • Define a well-commented main function in Python that determines the number of terms (N1, N2, and...

    Define a well-commented main function in Python that determines the number of terms (N1, N2, and N3) required for each method of calculating pi to a given level of precision E = 10^-3. Store the number of terms in a dictionary with key/pair defined as {n1: ’myPiOne’, N2: ‘myPiTwo’, N3:’myPiThree’}. Sort the keys from low to high and print out the associated Method Number pair. *Leibnitz, Adamchik, and Nilakantha to be used

  • Solve the following: There are 7 nodes, N1 to N7. N1 and N3 are Byzantine faulty nodes. Use OM(2)...

    Solve the following: There are 7 nodes, N1 to N7. N1 and N3 are Byzantine faulty nodes. Use OM(2) to solve this problem. N1 is the initial commander. Assume it sends a 0 to N2, N3, and N4 and it sends a 1 to N5,N6, and N7. You can choose any values for N3 to send to its receivers. Show the message sending tree and compute the output of the non faulty nodes

  • ANSWER ASAP PLEASE Using only the standard input/output function fgetc(), define a C function, called int...

    ANSWER ASAP PLEASE Using only the standard input/output function fgetc(), define a C function, called int readInt(int *value), that reads an integer from the keyboard (stdin), stores it in *value and, returns 1 for success or 0 for fail (in case the user enters nondigit characters). In particular, readInt() reads all characters, one by one, until a blank (or newline) is encountered. The string is then converted to an integer. It is also possible to have the sign charcater (+/-)...

  • Swapping Values in python Summary In this lab, you complete a Python program that swaps values...

    Swapping Values in python Summary In this lab, you complete a Python program that swaps values stored in three variables and determines maximum and minimum values. The Python file provided for this lab contains the necessary input and output statements. You want to end up with the smallest value stored in the variable named first and the largest value stored in the variable named third. You need to write the statements that compare the values and swap them if appropriate....

  • please answer second question using first diagram (5 Points) A light ray travels through three parallel...

    please answer second question using first diagram (5 Points) A light ray travels through three parallel slabs having different indices of refraction. Rank the materials according to the size of their indices of refraction. ni n2 n3 n1 > n2>n3 n2>nl > n3 ni > n3 > n2 n2 > n3 > ni n3 > n1 > n2 - (5 Points) Using the diagram in question 5, total internal reflection is possible when light travels Total internal reflection is not...

  • QUESTION 1 In one-way ANOVA, suppose that there are three treatments with n1 = 5, n2...

    QUESTION 1 In one-way ANOVA, suppose that there are three treatments with n1 = 5, n2 = 6, and n3 = 5. What is the rejection region for this test at the 5% level of significance? a)F > 3.81 b)F > 3.63     c)F > 3.24 d)F > 4.08 QUESTION 2 In one-way ANOVA, suppose that there are four treatments with n1 = 5, n2 = 6, n3 = 5, and n4 = 4. What is the rejection region for this...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT