skristimorris / python_ex_1 Goto Github PK
View Code? Open in Web Editor NEWThis project forked from chharding/python_ex_1
python refresher exercises - part 1
This project forked from chharding/python_ex_1
python refresher exercises - part 1
Python refresher exercises part 1 May 25, 2020 - This set of exercises uses topics from refreshers 1 and 2: basic data types and flow control - But, you're free to use other python concepts (functions, OOP) as well - My solution is directly below, but with a visual buffer so you don't see it accidentally. You should have gotten this file by forking the python_ex_1 project from my github repo: https://github.com/ChHarding/python_ex_1 How to work the exercises: - Use a debugger to set a break point at the print() at the top of the solution part so you don't accidentally run beyond it and see the solution. This is the "end" breakpoint - Set another "start" breakpoint at the print() that shows the start of each part write you code between those break points - To run your code, start the debugger (will stop at the "start" breakpoint) and hit step or continue. Once you have your bug free solution, remove the start and end breakpoints and move on to the next part. Here's an example: # part 0 # This is just a simple example to demonstrate how the start and end # breakpoint system works # Task: get the user's name with input() and print out Hello <name> # print("start of part 0") set breakpoint here # your code here print("end of 0") set breakpoint here ''' # solution 1 name = input("What's your name?") print("Hello", name) ''' Before we really start, a couple more things: - your solution may be different or even better than what I showed - Please get in the habit of documenting your code as you go along! You don't need to state the obvious but you should point out anything that could be interesting later. - After you've finished the code for a part (or even more often) you must perform a commit! You should also push your commit to the remote master (Push) once in a while Grading: - I will grade purely on effort based on your comments and commits! - Each part is worth 1 point - That means I don't really grade (judge you) by the quality of your code - Please give it your best shot and try to get a good result but it's up to you you fancy you want to get. If you're stuck, you can't get a good result, and you're out of time, just put in a (brief) comment about what you tried and move on. If a part always produces an error (i.e. would stop execution) use ''' ''' to comment out the entire part, that way your debugger won't stop! I will still give you your point if I can see that you at least tried ... something! Handing in: - once you're done type this into your OS console in VS: python refresher_ex_1.py > results.txt this will run your file and put the output into results.txt. on Canvas hand in: - your version of this .py file - your results.txt - tell me the URL of your forked repo May 29, 2020 - I just added a folder called one ex per file, which has each exercise (1 through 4) as a separate file. - Use this if you don't like working with one very long .py file - If you do use it, just give me 4 results file (results1.txt, results2.txt, etc.)
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.