import sys
import stddraw
from picture import Picture
fil = sys.argv[1]
wT = int(sys.argv[21)
hT = int(sys.argv[3])
source Picture (f il)
target = Picture(wT, hT)
for colT in range(wT):
for rowT in range(hT):
colS colT * source.width() ¡I wT
rowS = rowT * source.height() II hT
target.set(colT, rowT, source .get(colS, rowS))
stddraw. setCanvasSize(wT, hT)
stddraw . picture (target)
stddraw. show ()
Based on this code, compose a function with the following definition:
def scale(image, scale_f actor): that accepts a Picture object (not a string, pass the actual Picture object) and a floating-point scale factor, and returns a new Picture object that contains the image contained in the argument, but with its dimensions scaled by the specified factor. For example, if a 500-by-5(X) pixel image is used as input, and a scale factor of 2.0 is specified, the returned Picture object should be 1000-by- 1000 pixels in size.
Once this function has been defined, write the main function that takes a filename and a scale factor as command-line arguments, and then calls the scale function using those inputs, and then displays the resulting scaled image. Call this file scale_test. py.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme