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
Darina [25.2K]
3 years ago
11

Compare userNumber with compareNumber and display 'Numbers are not equal' if the numbers are different. Then, display 'Variables

are not identical' if the variables are not identical (not strictly equal).

Computers and Technology
1 answer:
masya89 [10]3 years ago
3 0

Answer:

Following are attached images that will help you understand the complete code. The code is tested with different variables and different outputs are obtained. All the necessary description is given in the form o comments inside the code.

Explanation:

You might be interested in
On the classic gameshow The Price Is Right, contestants must guess the price of an object (guesses are distinct). The winner is
Kruka [31]

Answer:

The program code is in explaination

Explanation:

Program code below.

def judge(auction,price):

"""

Function: Returns Name who auctioned very near to give price

Input :

auction : list of tuples

price : auction price

output: returns name of best auction amount holder

"""

diff = [] #storing differences between auctionist amount and price

count = 0

for each_pair in auction:

if each_pair[1]<=price:

diff.append(price-each_pair[1])

else:

count+=1

diff.append(each_pair[1])

if count == len(auction): #check for if no one have auctioned good amount

return None

else:

more_possibility_index = diff.index(min(diff)) #finding index of best amount from diff list

return auction[more_possibility_index][0]

auction = [('Alice',430),('Bob',538),('Carol',487),('David',550)]

price = 520

print(judge(auction,price))

I kept the output at the attachment.

3 0
3 years ago
Why did it take fewer 1-inch tiles than 1-centimeter tiles to measure the length of the cookie cutter?​
Romashka-Z-Leto [24]

The inch tiles are larger, meaning they use less space.

6 0
3 years ago
Can anyone answer this ​
Ivenika [448]

Answer:

I dont see the question

Explanation:

7 0
3 years ago
Atieno is a musician who records music on her computer. Which devices do you think she would need the most?
AURORKA [14]

Answer:

Midi Synthesizer, Mic,Boom Mic, Laptop

Explanation:

At the end of the day a keyboard and a pc is all you need as the keyboard alone can cover nearly any instrument.

8 0
3 years ago
Wat kind o mouse pleese hep meh​
Trava [24]

Answer:

It's is a razer Basilisk

4 0
3 years ago
Other questions:
  • Which of the following events would most likely produce an earthquake
    10·1 answer
  • What process periodically validates a user’s account, access control, and membership role on inclusion in a specific group?a. Re
    12·1 answer
  • Gear systems with __________ can have both drive and driven gears on the same shaft. a. an odd number of gears b. an even number
    6·1 answer
  • You are developing a Windows forms application used by a government agency. You need to develop a distinct user interface elemen
    14·1 answer
  • Christina has been asked by the firewall administration group to identify secure network protocols that can be used to prevent n
    5·1 answer
  • Write 3 things that can't be done without technology.
    14·2 answers
  • What should you do if a headset plugged into your computer is not working properly.
    12·1 answer
  • From the time users first visit a new website, or view a new media piece, how much time will they spend on the site before they
    10·1 answer
  • A large organization is struggling to close the gaps in skill levels that exist between its employees and those from competing c
    6·1 answer
  • External hard drives typically connect to a computer via an external port (such as a usb or ____ port) or a wireless connection.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!