Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Summary In this lab, you complete a prewritten Python program that computes the largest and smallest of three integer values. Instructions Two variables named largest

Summary

In this lab, you complete a prewritten Python program that computes the largest and smallest of three integer values.

Instructions

Two variables named largest and smallest are assigned for you. Use these variables to store the largest and smallest of the three integer values. You must decide what other variables you will need and initialize them if appropriate.

Your program should prompt the user to enter 3 integers.

Write the rest of the program using assignment statements, and if else 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 by clicking the Run button at the bottom of the screen.

Using the input of -50, 53, 78, your output should be:

The largest value is 78 The smallest value is -50

GIVEN CODE:

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

# Declare and initialize variables here

largest = None

smallest = None

# Prompt the user to enter 3 integer values

# Write assignments, and necessary 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))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions