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
Basile [38]
4 years ago
14

Two variables named largest and smallest are assigned for you. Use these variables to store the largest and smallest of the thre

e integer values. You must decide what other variables you will need and initialize them if appropriate.
Write the rest of the program using assignment statements, ifstatements, or elif statements as appropriate. There are comments in the code that tell you where you should write your statements. The output statements are written for you.

Execute the program. Your output should be:

The largest value is 78
The smallest value is -50
# LargeSmall.py - This program calculates the largest and smallest of three integer values.
# Declare and initialize variables here
firstNumber = -50;
secondNumber = 53;
thirdNumber = 78;

# Write assignment, if, or if else statements here as appropriate

# Output largest and smallest number.
print("The largest value is " + str(largest))
print("The smallest value is " + str(smallest))

Computers and Technology
1 answer:
Svetlanka [38]4 years ago
7 0

Answer:

# LargeSmall.py - This program calculates the largest and smallest of three integer values.

# Declare and initialize variables here

firstNumber = -50;

secondNumber = 53;

thirdNumber = 78;

# Write assignment, if, or if else statements here as appropriate

#Finding the Largest

if firstNumber>secondNumber and firstNumber>thirdNumber:

   largest = firstNumber

elif secondNumber>firstNumber and secondNumber>thirdNumber:

   largest = secondNumber

else:

   largest = thirdNumber

#Finding the smallest

if firstNumber<secondNumber and firstNumber<thirdNumber:

   smallest = firstNumber

elif secondNumber<firstNumber and secondNumber<thirdNumber:

   smallest = secondNumber

else:

   smallest = thirdNumber

# Output largest and smallest number.

print("The largest value is " + str(largest))

print("The smallest value is " + str(smallest))

Explanation:

Given that Most part of the code has already being written using python programming language. Our task was to add the necessary if and else statements that will check the three numbers and return the largest and smallest among them. Check the attached screenshoot for the program output, also read the comments made in  the code

You might be interested in
What is the difference between the Paste Special and Paste Link options?
kotegsom [21]
Paste Link lets you automatically update the referenced document.
8 0
4 years ago
Read 2 more answers
WILL GIVE BRAINLIEST IF DONE CORRECT
Juliette [100K]

Answer:

import sys

#account balance

account_balance = float(500.25)

##prints current account balance

def printbalance():

  print('Your current balance: %2g'% account_balance)

#for deposits

def deposit():

 #user inputs amount to deposit

 deposit_amount = float(input())

 #sum of current balance plus deposit

 balance = account_balance + deposit_amount

 # prints customer deposit amount and balance afterwards

 print('Deposit was $%.2f, current balance is $%2g' %(deposit_amount,

balance))

#for withdrawals

def withdraw():

 #user inputs amount to withdraw

 withdraw_amount = float(input())

 #message to display if user attempts to withdraw more than they have

 if(withdraw_amount > account_balance):

   print('$%.2f is greater than your account balance of $%.2f\n' %

(withdraw_amount, account_balance))

 else:

   #current balance minus withdrawal amount

   balance = account_balance - withdraw_amount

   # prints customer withdrawal amount and balance afterwards

   print('Withdrawal amount was $%.2f, current balance is $%.2f' %

(withdraw_amount, balance))

#system prompt asking the user what they would like to do

userchoice = input ('What would you like to do? D for Deposit, W for

Withdraw, B for Balance\n')

if (userchoice == 'D'): #deposit

 print('How much would you like to deposit today?')

 deposit()

elif userchoice == 'W': #withdraw

 print ('How much would you like to withdraw today?')

elif userchoice == 'B': #balance

 printbalance()

else:

 print('Thank you for banking with us.')

 sys.exit()

6 0
3 years ago
Read 2 more answers
Testing a website includes visiting every web page on the site and selecting every link, tab, and button available.
mixas84 [53]

Answer:

Wouldn't it be false?

Explanation:

because what if the website doesn't allow some kinds of people on certain pages?

(If its wrong then sorry.)

4 0
2 years ago
PLEASE ILL MARK BRAINLIEST
Minchanka [31]

Answer:

it is a capsid

5 0
3 years ago
A call center is a _______.<br><br> JIT<br><br> CMA<br><br> CIC<br><br> SFA
sp2606 [1]

Answer: CIC

Explanation:

A call center is a customer interaction center (CIC) and it is the interface between call center agent with the customers directly. CIC are connected by the external telephone system and it uses as call center.

And the caller are basically identify by the telephone number and customer information are display in the CIC.

CIC are the modular structure for communication which include various components of CIC and framework.

4 0
4 years ago
Other questions:
  • 1. What does a transistor do?
    6·1 answer
  • Write the getNumGoodReviews method, which returns the number of good reviews for a given product name. A review is considered go
    14·1 answer
  • The list below represents the contents of a computer's main memory. I've left every other byte blank. Assume that the letters at
    14·1 answer
  • Technological improvements have allowed people to inhabit a wider variety of places more easily. Please select the best answer f
    6·2 answers
  • In a proper webpage, which tag holds all of a webpages visible HTML?
    5·1 answer
  • Google Ads was designed to help businesses achieve online success. To accomplish this, Google Ads was built on three core princi
    13·1 answer
  • Which three items might appear on the project plan when discussing an upcoming website with a design team? (Choose three)
    12·1 answer
  • You can include up to _____ logical conditions in the and function. (487181)
    12·1 answer
  • An administrator has just changed the IP address of an interface on an IOS device. What else must be done in order to apply thos
    5·2 answers
  • Compare and contrast the various write strategy used in cache technologies<br>​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!