wisalmalik / autograder-1 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from irsakhan/autograder
Some intermediate Python exercises.
This project forked from irsakhan/autograder
Some intermediate Python exercises.
# AutoGrader Assignment 2 ### YOUR CODE FOR calculateArea() FUNCTION GOES HERE ### def calculateArea(length, width): return length * width #### End OF MARKER ### YOUR CODE FOR checkTilesFit() FUNCTION GOES HERE ### def checkTilesFit(plot_length, plot_width, tile_length, tile_width): plot_area = calculateArea(plot_length, plot_width) tile_area = calculateArea(tile_length, tile_width) if plot_area % tile_length == 0.0 and plot_area % tile_width == 0.0 and plot_length > 0 and plot_width > 0 and tile_length > 0 and tile_width > 0: return True else: return False #### End OF MARKER ### YOUR CODE FOR calculateTiles() FUNCTION GOES HERE ### def calculateTiles(plot_length, plot_width, tile_length, tile_width): if type(plot_length) == str or type(plot_width) == str or type(tile_length) == str or type(tile_width) == str: return "Invalid Input" elif plot_length == 0 or plot_width == 0 or tile_length == 0 or tile_width == 0: return None plot_area = calculateArea(plot_length, plot_width) tile_area = calculateArea(tile_length, tile_width) number_of_tiles = plot_area // tile_area print(number_of_tiles) tiles_fit = checkTilesFit(plot_length, plot_width, tile_length, tile_width) print(tiles_fit) if type(number_of_tiles) == int and tiles_fit == True: return number_of_tiles else: return "Not Possible" #### End OF MARKER
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.