0% found this document useful (0 votes)
110 views28 pages

Unit 1: Welcome - How This Course Works: Week 0: Getting Ready

This document provides an overview of how the Python for Beginners course will be structured and what to expect. It outlines the following key points: - The course covers Python fundamentals over 6 weeks, with each week focusing on a specific topic. - The main learning materials are Jupyter Notebooks that combine documentation and code examples. - Regular practice through exercises is important for learning to program. Mandatory weekly assignments and a final exam must be completed to earn a certificate. - CodeOcean is used to evaluate coding exercises through automated tests. Students submit solutions on CodeOcean and receive feedback to check their understanding.

Uploaded by

Vera Whitehead
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views28 pages

Unit 1: Welcome - How This Course Works: Week 0: Getting Ready

This document provides an overview of how the Python for Beginners course will be structured and what to expect. It outlines the following key points: - The course covers Python fundamentals over 6 weeks, with each week focusing on a specific topic. - The main learning materials are Jupyter Notebooks that combine documentation and code examples. - Regular practice through exercises is important for learning to program. Mandatory weekly assignments and a final exam must be completed to earn a certificate. - CodeOcean is used to evaluate coding exercises through automated tests. Students submit solutions on CodeOcean and receive feedback to check their understanding.

Uploaded by

Vera Whitehead
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Week 0: Getting Ready

Unit 1: Welcome – How This Course Works


Welcome – How this course works
Introduction and welcome

▪ Welcome to the course “Python for Beginners”


▪ This course addresses real beginners in programming.
− If you’ve never implemented a program but are
curious about what programming is all about, then
this course is aimed at you.
− If you’ve learned to write programs in another
computer language but are interested in getting an
introduction to Python, then this course is great for
you as well.
▪ The course covers the basics in Python like variables,
data types, and control structures.
− These concepts are introduced week by week.
• It is explained how they are used in Python
• Examples are given to support your understanding.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 2
Welcome – How this course works
To learn programming requires practice

▪ You cannot learn programming by just following a video or


reading a book.
▪ If you want to learn programming, you have to program,
program, program …
− This is like learning to play the piano. You cannot learn to
play the piano by reading a book about it. You have to
practice.
▪ For this reason, the course offers a lot of larger and smaller
programming exercises.
▪ We expect you to practice, to go through the programming
exercises, and to implement Python programs.
▪ It’s best to do this on a weekly basis.
− To learn programming requires regular repetition.
▪ Consequently, there are mandatory programming exercises
to pass the course and gain a certificate.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 3
Welcome – How this course works
Each week focuses on a specific topic

Week 1: Python Fundamentals: Statements, variables, data types, and the “if” statement

Week 2: Lists and Loops: Working with sequences and the “for” loop

Week 3: Complex Data Types: More data types and the “while” loop

Week 4: Reading and Writing Data: Handling files

Week 5: Functions: Reusing code and structuring your programs

Week 6: Libraries: Finding and using functions written by others

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 4
Welcome – How this course works
The main learning materials are Jupyter Notebooks

▪ Each week is split into several units, and each unit


starts with a few slides, to explain the content of the
unit
▪ However, the full content with explanations and
examples is contained in Jupyter Notebooks
▪ What are Jupyter Notebooks?
− Jupyter Notebooks combine documentation and
the possibility to program in one place
− Thus, Notebooks are perfect for teaching and
learning, because all you need is in the same
place
− We will explain how to install the Jupyter
Notebooks software in unit 3
− We will explain how to work with a Jupyter
Notebook in unit 4

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 5
Welcome – How this course works
Quizzes, mandatory exercises, and additional exercises

▪ All units contain a quiz or a short programming exercise.


− These quizzes and exercises can be done as often as you like.
− You don’t need to complete them to get the course certificate.
− We’ll provide example solutions for these exercises.
▪ At the end of each week there is a weekly assignment.
− These assignments consist of a questionnaire and a programming exercise.
− You must complete these assignments to get the certificate.
− We’ll provide commented example solutions by beginning of the following week.
▪ We also offer additional exercises.
− These do not count towards the certificate.
− They aim to provide additional examples to extend the material for the week.
− Again, commented example solutions will be provided.
▪ The final exam consists of a questionnaire and programming exercises.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 6
Welcome – How this course works
What can you expect from us? What do we expect from you?

▪ If you participate in the course you can expect the following from us:
− New learning material (notebooks, videos, …) every week
− Additional notebooks with additional exercises and example solutions
− Most example solutions will be explained in a video
− You can look over our shoulder while we’re solving the exercises
(Actually, observing experienced programmers is a good way of
learning programming)
− We’ll try to answer questions in the forum as quickly as possible
▪ What we expect from you
− You should try to implement the exercises yourself
− You have to hand in the weekly assignment
− You should actively participate in the forum
− You should not hesitate to use other tutorials or learning materials.
Lots of material related to Python can be found on the Internet

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 7
Welcome – How this course works
You want to use your own IDE?

▪ If you can’t use Jupyter Notebooks or would simply


like to use another IDE (integrated development
environment), of course you can do so.
− However, we cannot provide support for handling
IDEs
▪ For the programming assignments, you have to
upload your programs to CodeOcean, which will be
explained in the next unit.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 8
Thank You!

Contact Information:
[email protected]

This under
This work is licensed work isa licensed
Creative under a Creative
Commons Commons Attribution-ShareAlike
Attribution-ShareAlike 4.0 International 4.0 International License.
License. open.sap.com Slide 9
Week 0: Getting Ready
Unit 2: CodeOcean
CodeOcean
CodeOcean is the system to evaluate your coding exercises

▪ CodeOcean is the system we use for grading the coding


exercises.
– For each of the exercises, we have some tests to check if
your solution is correct.
– CodeOcean provides feedback if there are problems with
your solution.
▪ It is quite easy to use CodeOcean (cf. the following page).
– For each exercise in the course, we provide a link to the
exercise in CodeOcean.
▪ Actually, CodeOcean is a small environment to develop code.
– You can enter your code, execute the code, observe the
output, and get feedback in case of errors.
▪ However, we recommend to solve the exercises in the
notebooks and copy and paste the solution for grading into
CodeOcean.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 2
CodeOcean
CodeOcean is easy to use

▪ The highlighted area (yellow) is used


for coding.
▪ Here you can directly type in your code.
▪ Again, we recommend to first solve the
program in the notebook and then copy
your solution into CodeOcean.
▪ If you click the “Run” button, the code
will be executed (cf. next page).

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 3
CodeOcean
You can execute your code in CodeOcean

▪ The output of your program is


shown in the highlighted field on
the right.
▪ So far, the solution has NOT
been handed in for evaluation!
▪ To do so, use the “Score” button
(cf. next page).

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 4
CodeOcean
Your code is automatically evaluated

▪ Once you have handed in your


program for scoring, your solution
is evaluated, i.e. it is run against
our tests.
▪ As you can see in the highlighted
part of the figure, two tests were
passed, and the score of one
point is given.
▪ You can score your solution
multiple times in order to fix
previous errors.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 5
CodeOcean
Finally, submit the solution to openSAP

▪ If you are fine with the score you have


received, submit your solution to
openSAP by pressing the “Submit
Code for Assessment” button.
– In the right sub-window, scroll down
until the button appears.
– Click the button.
▪ Important: You MUST NOT go back
with the Back button of your browser.
– If you want to redo the exercise,
close the browser tab/window and
start the exercise again from the
course.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 6
CodeOcean
Run → Score → Submit

▪ What are the differences between these actions?


– Run: Executes the code. The output of the code is shown in the right
sub-window. If the execution produces errors, these are shown as
well.
– Score: Executes some test cases. Potential output from the test
cases is presented in CodeOcean. In addition, you can see how
many points the scored solution gets. The points are not yet
forwarded to the course in openSAP.
– Submit: The program is executed, the points are evaluated, and the
result is forwarded to openSAP. Now the points are awarded to you in
the course.
▪ You can redo all three actions as often as you like. But …
– Before you re-submit your code, you have to first close the TAB and
open it again by clicking on the exercise from the course in openSAP.
– Submission can only be done before the deadline.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 7
CodeOcean
CodeOcean supports cooperation between participants

▪ In case of problems, you can


request feedback.
▪ This request is visible to other
participants, who can give
feedback.
– To have a look at your requests
(and follow up on the feedback
by others), click on your name
(upper right corner) and go to
the requests.
▪ Alternatively, you can post your
questions in the forum.
– Don’t forget to include the
number of the exercise.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 8
CodeOcean
CodeOcean is really easy to use

▪ You will be directed to CodeOcean to hand in your solution


for the programming exercises.
▪ We recommend to first solve the exercises in Notebooks.
– Once you are fine with the solution, go to CodeOcean.
▪ Copy your code into the input field, then run the code.
▪ If everything looks fine, hand in the code for scoring.
▪ If the score evaluation is okay, submit the code to get the
points in the course.
▪ If there are tests which are not passed, try to fix the code in
the notebook and start again.
▪ You can run, score, and submit the code as often as you like.
▪ Use the possibility to request comments for support, if
required.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 9
Thank You!

Contact Information:
[email protected]

This under
This work is licensed work isa licensed
Creative under a Creative
Commons Commons Attribution-ShareAlike
Attribution-ShareAlike 4.0 International 4.0 International License.
License. open.sap.com Slide 10
Week 0: Getting Ready
Unit 4: How to Use Jupyter Notebooks
How to use Jupyter Notebooks
Now it’s time to start a Jupyter Notebook

1. Open a shell (cmd-shell, PowerShell, or Terminal)


2. Type “jupyter notebook” and hit enter ⏎
– The Jupyter server starts
– It opens either a new browser or a new tab in an
already running browser
(cf. figure)
– The shown content depends on your computer.

Depending on your installation of Python and


Jupyter Notebook there may be other options to
start the Jupyter server.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 2
How to use Jupyter Notebooks
Navigate to your course directory and open the notebook

▪ At this point, you should think about where to store all


the course material.
− We recommend creating a folder dedicated to this
course.
− All the course material should be stored in this folder
(notebooks, pdfs, exercises, notes, …).
− You could name the folder e.g. “open-sap-python”
▪ Download the Jupyter Notebook called
“openSAP_python1_week_0_unit_4_helloworld.ipynb”
and store it in the folder you just created.
▪ Now go back to the Jupyter tab in your browser,
navigate to this folder and open it by clicking on it.
▪ Your browser should look like the screenshot on the
right.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 3
How to use Jupyter Notebooks
Congratulations, your workplace is prepared to start the course

▪ Now you’re ready to start the course.


▪ There’s one important note:
− Due to the myriads of different combinations of
hardware, operating systems, installed software
on the computer, configurations, settings … we
are not able to provide support for the installation
of Python and Jupyter Notebook
− In case of problems, please try to find a solution
yourself.
▪ Starting with week 1, we assume that Python and
Jupyter are installed and working properly.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 4
How to use Jupyter Notebooks
The course is based on Jupyter Notebooks

▪ Nevertheless, each unit starts with some slides to


introduce the following content.
▪ After this introduction, the course continues with the
notebook. If you are following the course, you have
to switch from pdf to notebook. This switch is always
introduced by the following slide (cf. next page)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 5
How to use Jupyter Notebooks
Showtime

Now it’s time to get hands on


and start programming!

If you like, you can open the


Jupyter Notebook instructions
in parallel to the demo.

If you haven’t done so yet:


▪ Download the Notebook
▪ Start the Jupyter Server
▪ Open the Notebook

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 6
How to use Jupyter Notebooks
This course is based on Jupyter Notebooks

Let us have a closer look at notebooks:


▪ Our notebooks consist of two types of cells:
− Markup cells which contain explanations
− Code cells which contain programs
▪ The notebooks are interactive, i.e. you can
(and have to) start programming yourself.
▪ The cells have two modes:
− In edit mode you can implement or change
programs
− In command mode you can execute the program in
the cell.
▪ Let’s have a look. Let’s go into a notebook ...

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 7
How to use Jupyter Notebooks
Showtime

Now it’s time to get hands on


and start programming!

If you like, you can open the


Jupyter Notebook instructions
in parallel to the demo.

If you haven’t done so yet:


▪ Download the Notebook
▪ Start the Jupyter Server
▪ Open the Notebook

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. open.sap.com Slide 8
Thank You!

Contact Information:
[email protected]

This under
This work is licensed work isa licensed
Creative under a Creative
Commons Commons Attribution-ShareAlike
Attribution-ShareAlike 4.0 International 4.0 International License.
License. open.sap.com Slide 9

You might also like