Coder Social home page Coder Social logo

programming-23's Introduction

Material template

This repository contains both the source code of this course's webpage and the source for the content of the course. The content is located in the data folder and everything else is for the website.

Contributing to the content

If you spot a mistake, feel free to open an issue in this repo after consulting with the course assistants.

If you'd help us making the correction, you can open a pull request with your proposed changes. You may find these resources helpful for doing this:

Development environment

Below are instructions on how to setup a development environment on your own machine. These instructions are only relevant to you if you wish to chage how the course's website works or looks like. If you don't know how to program or only wish to contribute to the content of the course, please skip this section.

Requirements: recent Node

npm ci
npm run develop

Content is in the data folder.

Custom markdown components are located in src/partials

If you want to use local, unpublished version of moocfi-quizzes for testing, run ./use-local-quizzes.sh before running the application. If your configuration differs from the default, add the path to the moocfi-quizzes as the first argument to the script. An illustration of the default configuration:

  (parent directory)
  /                \ 
(this repo)      [quizzes](https://github.com/rage/quizzes)
                      |
                  packages
                      |
                  moocfi-quizzes

Sometimes when making certain type of changes to the queries, you may wish to restart Gatsby automatically each time the development server exits. To accomplish this you can run the script: ./develop-loop.sh.

Authors

Material template created by Henrik Nygren and Antti Leinonen.

License

Material template

Copyright 2018 Henrik Nygren, Antti Leinonen, and the Agile Education Research group.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Course material

The course material is licensed under a Creative Commons BY-NC-SA 4.0 license.

programming-23's People

Contributors

avihavai avatar concernedhobbit avatar d471061c avatar dennisahlqvist avatar finthunderstorm avatar gudkat avatar jarnovirta avatar jolampi avatar jussmaki avatar karkkieila avatar kkiilas avatar ljleppan avatar lofhjann avatar makeri89 avatar mession avatar minnaron avatar mluukkai avatar myathtunkhant avatar ngoubou avatar niinasaarelainen avatar nygrenh avatar pllk avatar redande avatar reettap avatar rikochyou avatar s4ndyk avatar sebazai avatar sloproo avatar viipu avatar vilmakoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

programming-23's Issues

Nit - Exam timing / Incorrect UTC offset

On the exam page, the text indicates Helsinki is at UTC +03:00 under Information about exam arrangements.
That info is not correct for the exams of 25.11.2023 through 24.02.2024, as Daylight Savings Time (DST) ended on 29.10.2023.

Similar holds for the page detailing the exam intro page for the 25.11 exam.

As a suggestion, how about:

All times are local time in Helsinki, Finland. This is either UTC +02:00 (winter) or UTC +03:00 (summer)
For those based elsewhere, check your favourite search engine or a [world clock](https://www.worldtimebuddy.com/)

Exercise part07-02_special_characters tests failing in server

FAIL:
SpecialCharactersTest: test3_uses_import_expression
'utf-8' codec can't decode byte 0xe9 in position 640: invalid continuation byte

Root cause for the failure: the test function uses 'utf-8' codec which fails in decoding some special characters used in the tests. Use 'latin-1' codec in this exercise to fix the problem.

Typo in Part 8 -> Defining Classes

data/part-8/3-defining-classes.md
In line no. 26 - Classes are usually named in camel case.
instead of camel case it should be pascal case i guess.

Breaking intellisense python course basic part 6

Hello,

Something about your projects in part 6 of your python course breaks intellisense, forcing it to load indefinitely. I was able to get it working in another project. I am unsure how to fix this, while not mandatory that it is active, it is a nice feature to use.

Part4.Sec3 Lists: Ex. 1: Change the Value of an Item (SyntaxError, but no errors in Debugging and it Passes)

Debugging
Part4Sec3Ex1 Changethevalueofanitem
Python Tutor

I can't run the program, is the interpreter reads "Invalid Syntax" - however, I am able to run it just fine on Python Tutor, it passed the TMC Test, and when I debug, nothing appears to stop the program, and it functions exactly like in the example indices and values from the exercise prompt.

My only guess is that I didn't add a line of code with a condition that prints("Index out of range") if someone inputs an index outside of the range of len(list). Is this what it's referring to? If so, how was the program able to pass if this wasn't accounted for? This is particularly frustrating as the prompt itself says "You can assume all given index values will fall within your list."

Thank you for any and all feedback!
Gratefully yours,
Max
Prompt

Mooc

I can't continue past part 4, since they're all meant to be done in vsc but there is nothing past part 4, except for part 8, but I need to do part 5-8 too

Spelling errors in Part 5

Hi there, I noticed a couple of typos in Part 5.

In 1 more lists, the phrase "traversed wth a for loop" should be "traversed with a for loop." And in 3 dictionary, the sentence "It is naturally possible to also remove key-value paris from the dictionary" should be "It is naturally possible to also remove key-value pairs from the dictionary."

Thanks for your attention to this matter!

Attaching images for more details:

issue-1
issue-2

Python Programming MOOC 2023- Built-in Exercises

Hello,

I am a recent enrolled student in the python programming mooc offered by University of Helsiniki. The coding exercises are not working properlly. I tried different browsers, nothing. Besides, when I try to submit my answer and run it, it send me message of program crashed.

I appreciate your prompt response,

Thank you.
Mohab

Part 7 Course statistics exercise

In part 1 of the exercise you need to retrieve all courses that have Enable as True but when submitting the exercise the check is saying that I'm missing a course from the list that has Enable as False.
image

{'week': 8, 'exercises': [0, 4, 4, 4, 5, 3, 3, 4], 'enabled': False, 'miniproject': False, 'peerReviewOpen': False, 'extension': False, '_id': '5c3dd379e2ecb8022bb75407', 'year': 2019, 'term': 'Fall', 'fullName': 'Cloud Computing Fundamentals', 'name': 'CCFUN', 'url': 'https://ccfun.fi/home', '__v': 8}

In part 2 of the exercise you need to retrieve data from a specific course and when submitting the exercise the check says that I have wrong maximum number of students in a week but it's the largest number of students from the retrieved course, so I'm very confused.
image

{'students': 4434, 'hour_total': 13718, 'exercise_total': 25199, 'hours': [None, 883, 1186, 879, 499, 274, 187, 48, 80, 15, 64, 4]}
{'students': 3123, 'hour_total': 26589, 'exercise_total': 42319, 'hours': [None, 45, 161, 260, 302, 302, 319, 160, 335, 122, 321, 46, 162, 24, 42, 104, 43, 15, 28, 6, 121, 5, 15, 1, 29, 16, 73]}
{'students': 2241, 'hour_total': 36425, 'exercise_total': 43278, 'hours': [None, 9, 14, 29, 62, 80, 107, 58, 124, 46, 239, 34, 145, 38, 62, 165, 94, 36, 75, 21, 298, 23, 38, 20, 48, 84, 20, 5, 6, 2, 84, 1, 9, None, 4, 16, 6, 2, 3, 1, 43, None, 2, None, None, 8, 1, None, 9, None, 44]}
{'students': 1714, 'hour_total': 33010, 'exercise_total': 36906, 'hours': [None, 7, 4, 10, 18, 43, 42, 27, 65, 23, 132, 23, 95, 28, 48, 138, 71, 24, 56, 34, 248, 29, 48, 29, 54, 103, 17, 2, 15, 1, 94, 3, 6, None, 5, 19, 6, 4, 1, 2, 49, None, None, None, 1, 7, None, None, 7, 1, 14, None, 1, 1, None, 2, None, None, None, 35]}
{'students': 1227, 'hour_total': 25443, 'exercise_total': 24974, 'hours': [None, 6, 1, 3, 11, 20, 22, 12, 44, 18, 65, 9, 55, 15, 36, 91, 50, 12, 57, 16, 204, 24, 25, 13, 48, 92, 10, 9, 14, None, 98, 2, 4, 1, 1, 18, 5, 1, 4, None, 46, None, 3, None, 1, 4,
2, None, 3, None, 12, 1, None, None, 1, 1, None, None, None, None, 5, None, None, 1, None, 15]}
{'students': 1010, 'hour_total': 20691, 'exercise_total': 20163, 'hours': [None, 4, 3, 2, 10, 12, 12, 9, 25, 9, 76, 12, 43, 21, 25, 80, 41, 17, 45, 16, 157, 26, 38, 11, 29, 87, 10, 7, 6, 1, 66, 1, 4, 1, 4, 13, 3, 1, 3, 3, 28, 1, 4, None, None, 7, None, None, 5, 1, 9, 1, None, None, None, None, None, None, None, None, 3, None, None, None, None, 11]}
{'students': 890, 'hour_total': 13988, 'exercise_total': 18084, 'hours': [None, 8, 7, 8, 21, 21, 32, 18, 53, 22, 92, 21, 68, 19, 28, 88, 61, 15, 30, 8, 103, 8, 9, 7, 18, 28, 4, 2, 6, None, 27, None, 6, None, 2, 5, None, 1, 2, None, 7, 1, 2, None, None, 1, None, None, 1, 1, 18]}
{'students': 717, 'hour_total': 16484, 'exercise_total': 12454, 'hours': [None, 10, 7, 10, 6, 9, 10, 12, 15, 3, 19, 3, 22, 4, 17, 32, 18, 12, 23, 4, 104, 17, 19, 10, 34, 67, 12, 6, 13, None, 77, None, 13, 2, 1, 16, 5, 1, 1, None, 26, 1, None, None, None,
4, 1, 1, 4, 1, 14, None, None, None, 1, 1, None, None, None, None, 4, None, None, None, None, 1, None, None, 13]}
{'students': 494, 'hour_total': 11777, 'exercise_total': 11836, 'hours': [None, 3, 1, 1, 5, 3, 6, 3, 10, 8, 19, 3, 16, 4, 10, 24, 10, 8, 17, 4, 71, 6, 18, 6, 24, 46, 11, 3, 13, 2, 51, None, 9, 2, 1, 10, 4, None, 4, 1, 21, None, None, None, None, 7, 1, None, 1, None, 6, None, None, None, None, 2, 1, None, 1, 1, 4, None, None, None, 1, None, None, None, None, None, None, 7]}
{'students': 112, 'hour_total': 2928, 'exercise_total': 2743, 'hours': [None, None, 3, None, 1, None, None, 1, 3, None, 3, 1, 3, 1, 2, 3, 3, 1, 1, None, 21, 1, 3, 1, 5, 9, 2, 3, 2, None, 10, None, 3, None, None, 3, None, 1, 2, None, 8, None, 1, None, None, 1, 1, None, None, None, 2, None, 1, None, None, None, None, None, 1, None, 1, None, None, None, None, 1, None, None, None, None, None, None, None, None, None, None, None, 2]}
{'students': 2, 'hour_total': 8, 'exercise_total': 0, 'hours': [None, 1, None, None, None, None, None, 1]}

Failed to initialize Pyodide: RuntimeError: abort(out of memory).

In Python Programming MOOC 2023 course on all exercises there is an error:
When pressing TEST: RuntimeError: abort(out of memory). Build with -s ASSERTIONS=1 for more info.
When pressing RUN: Failed to initialize Pyodide: RuntimeError: abort(out of memory). Build with -s ASSERTIONS=1 for more info.

Unable to login and Unable to reset password

I am unable to login or to reset the password.

Any time I try to login (tried with Chrome, Safari and Firefox), it shows: Something is wrong with the login details, please check them for any typos!

So I tried to reset the password. But all browsers show me that there is not secure connection.

CHROME:
This site can’t provide a secure connectiontmc.mooc.fi sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

FIREFOX:
Secure Connection Failed

An error occurred during a connection to tmc.mooc.fi. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.

description of `int` function in exercise `2.typecasting`

https://github.com/rage/programming-23/blob/main/data/part-2/1-programming_terminology.md?plain=1#L454 :

When programming in Python, often we need to change the data type of a value. For example, a floating point number can be converted into an integer with the function int:

temperature = float(input("Please type in a temperature: "))

print("The temperature is", temperature)

print("...and rounded down it is", int(temperature))

Please type in a temperature: 5.15
The temperature is 5.15
...and rounded down it is 5

Notice the function always rounds down, and not according to the rounding rules in mathematics. This is an example of a floor function.

sorry if i sound nitpicking, but this is in fact incorrect. int in python is taking the integer part, and this means it rounds towards zero, not always down.

>>> int(-0.7)
0

relevant docstring states:

Convert a number or string to an integer, or return 0 if no arguments
are given. If x is a number, return x.int(). For floating point
numbers, this truncates towards zero.

floor is a different function, that actually "rounds down":

>>> from math import floor
>>> floor(-0.3)
-1
>>> floor(-0.7)
-1

converting float/real data to integer is actually complicated and can be daunting sometimes, especially when it comes to "round" functions alluded to here (reference: https://www.gnu.org/software/libc/manual/html_node/Rounding-Functions.html). it is especially important not to leave wrong impressions in a introductory level class.

Soup or No Soup question (Part 1 - Conditional Statements)

Its impossible to get this question correct.

The program requires the following output:

Please tell me your name: Kramer
How many portions of soup? 2
The total cost is 11.8
Next please!

or

Please tell me your name: Jerry
Next please!

However, we get the following error message on submission:

FAIL: PythonEditorTest: test_1_kramer_1
With input Kramer, 1 your program should print out
Next please!
your program printed out
The total cost is 5.9

If you change the program so that an input of Kramer gets a 'Next please!' output, we get this error message:

FAIL: PythonEditorTest: test_1_kramer_1
With input Kramer, 1 your program should print out
The total cost is 5.9
your program printed out
Next please!

TMC is not responding

TMC is not responding. It is trying to connect but gives below messages:
There is no data provider registered that can provide view data.

Incorrect brackets used in "Half open intervals"

In the "Half open intervals" info text box (part 3, section 2 - Working with strings) the notation uses 2 square brackets to demonstrate a half open interval. This should be a mix of square and round brackets. The explanation states that in [a,b], a would be included, while b would not. In that case it should be written [a,b).

Path to notation:
#gatsby-focus-wrapper > div > div.Layout__SidebarPush-h1dut3-1.ixYNAc > main > div > article > div:nth-child(3) > aside:nth-child(65) > div > p:nth-child(1) > code:nth-child(1)

TMC MOOC Python runtime error

I have started with this online course and everything worked perfectly fine but suddenly this error popped up and i do not know how to fix it:

Runtime Error
Process didn't seem to finish or was taking a really long time.
Details:
Error stack
Runtime Error: Process didn't seem to finish or was taking a really long time.
at l. (c:\Users\HP i3.vscode\extensions\moocfi.test-my-code-2.2.4\dist\lib.js:2:505998)
at Generator.throw ()
at i (c:\Users\HP i3.vscode\extensions\moocfi.test-my-code-2.2.4\dist\lib.js:2:395466)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

It does not proceed with checking my code and i can not proceed as i do not get the points for the code if my code is not checked.

Tehtävien tarkastaminen ei toimi

Hei! Aloitin tekemään kurssia ja kurssin part 1 tehtävien tarkistaminen RUN tai TEST nappulalla ei toimi. "Initializing" jää vain pyörimään mutta en saa vastausta menikö tehtävät oikein vain väärin..

MOOC : language

I want to have english language but some text are shown in different language

Part 1, exercise 26: Temperatures

I can't understand what I did wrong.
It says:
"Your program should print out
32 degrees Fahrenheit equals 0.0 degrees Celsius
when input is 32, but now print out is
32 degrees Fahrenheit equals 0.0 degrees Celcius"

My code was:
temperature_f = int(input("Please type i a temperature (F):"))
temperature_c = (temperature_f - 32) * 5/9
print(f"{temperature_f} degrees Fahrenheit equals {temperature_c} degrees Celcius")
if temperature_c < 0:
print("Brr! It's cold in here!")

Can someone help?

Spelling error on Python Programming 2023 Part 5, (3. Dictionary)

Right under the phone-book version 2 exercise, the paragraph reads
"It is naturally possible to also remove key-value paris from the dictionary. There are two ways to accomplish this. The first is the command del:"

Key-value pairs is misspelled as key-value paris. Hope this helps!

Error code: STATUS_STACK_OVERFLOW

Parts 1, 2, and 3 of the "Introduction to Programming" all bring up "Error code: STATUS_STACK_OVERFLOW" no matter what section I attempt to open.

Exercise part06-16_dictionary_file two tests failing in server with a strange message

FAIL:
DictionaryFileTest: test_1_exit_only
Program should output two lines with input
3 now the output is
Bye

Question: Why is the test function expecting an output of two lines? This contradicts with the exercise example output

FAIL:
DictionaryFileTest: test_2_remove_add_words_and_exit
Program should output two lines with input
1
auto
car
3 now the output is
Dictionary entry added
Bye

Question: Why is the test function expecting an output of two lines but rejecting a two-line output?

Login Form Not Submitting After Entering Username and Password

Hello!
I need help to keep doing my mooc python course: https://programming-23.mooc.fi/part-7/
I'm using Microsoft Edge, and it has worked for me until now.
Basically, when trying to log in, the placeholder text "username" and "password" remain visible in the input field and also doesn't load. Also, the exercises don't display and instead I can only see 'Loading'. But it never loads!

I tried to check if the exercises work from my iPad using safari, and they did load. So I am going to download other browser, but also I am not sure about which one.

I opened the console to see if there were errors and this is what I got:
errorrrrr

I don't understand anything from there, but in case it's helpful to know what's happening.
Thank you very much in advance!!!!

Part 12 - Section 1: BallPlayers Exercise | Mismatch between assignment and exercise text

The exercise instructions state that a BallPlayer class has the following attributes:

  • name
  • shirt number number
  • scored goals goals
  • assists completed assists
  • minutes played minutes

However, in the actual code assignment a BallPlayer class has the following attributes (difference in bold):

  • name
  • shirt number number
  • scored goals goals
  • passes completed passes
  • minutes played minutes

In Part 2 of the exercise, it states that we should return a sorted list of players sorted by the most points scored, with points being defined as the amount of goals scored + the amount of assists completed. Since there is no assists attribute, I assumed it got mixed up with the passes attribute and used that instead, which worked.

Hopefully it gets corrected to avoid confusion.

[Question] Private variable/method in Python classes

I happened to discover the following while looking around this course materials.

At least in Part 9 and 10, the term "private" is widely used. It seems that Part 9 introduces the concept of "private" related to the concept of encapsulation.

But my question is, is that really a convention for the Python community to use mangling(__variable) to represent private variables and methods inside a class? According to this official docs regarding private variables mangling is used for avoiding naming collisions in class inheritance.

Note that the mangling rules are designed mostly to avoid accidents; it still is possible to access or modify a variable that is considered private. This can even be useful in special circumstances, such as in the debugger.

I am not a Python expert so I am not sure about the current standpoint of the community on this matter(and PEP8 seems a bit ambiguous). Could you recommend a few resources such as open source code examples? I'll really appreciate it.

Test password generator part 2.py not checking correctly

i have written code that works all the time in the terminal but fails during the TMC tests. i have checked the test code itself and when i ran it this error occurred:

Traceback (most recent call last):
File "c:\Users\HP i3\AppData\Local\tmc\vscode\mooc-programming-23\part07-06_password_generator_part_2\test\test_password_generator_part_2.py", line 4, in
from tmc import points
ModuleNotFoundError: No module named 'tmc'
PS C:\Users\HP i3\AppData\Local\tmc\vscode\mooc-programming-23\part07-06_password_generator_part_2\test>

i can not get the points for this exercise with this issue

Name and exclamation marks

Please write a program which asks for the user's name and then prints it out twice on a single line so that there is an exclamation mark at the beginning of the line, another between the two names and a third one at the end of the line.

The program should function as follows:

Sample output
What is your name? Paul
!Paul!Paul!

I need some help with this issue
name = input (“What is your name? Paul”)
output = “!Paul!Paul!”
print(output)

Typos in Part 14

Hi, there are a few typos in the text of part 14, e.g.:

  • Section "Creating the grid" : "two.dimensional";
  • Section "Refactoring?": "requiares"
  • Section "Move counter" : "displaye", "shanges"
  • Section "The last programming exercise": "appropriate,a dn"

All best wishes,
p

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.