GithubHelp home page GithubHelp logo

skristimorris / python_ex_1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chharding/python_ex_1

0.0 0.0 0.0 92 KB

python refresher exercises - part 1

Python 74.45% Jupyter Notebook 25.55%

python_ex_1's Introduction

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.)

python_ex_1's People

Contributors

skristimorris avatar chharding avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.