OSDev.org https://forum.osdev.org/ |
|
New Python Projects https://forum.osdev.org/viewtopic.php?f=13&t=29241 |
Page 1 of 2 |
Author: | mac [ Fri Apr 17, 2015 2:16 am ] |
Post subject: | New Python Projects |
I'm in here looking for some ideas for how I can broaden my Python abilities. I know pretty well the concept of memory variables, and I was even messing around in an interpreter creating small functions (like returning a value or something). How could I broaden my knowledge with small projects to work on. By the way, I decided to go with the learn as you create route here on. |
Author: | KemyLand [ Sat Apr 18, 2015 3:06 am ] |
Post subject: | Re: New Python Projects |
Although OSDev.org is not the appropiate forum (maybe it's okay in General Programming?), you may want to start with something like this by the moment. I can't provide too much help until you get into basic OSDeving. |
Author: | Muazzam [ Sat Apr 18, 2015 5:39 am ] |
Post subject: | Re: New Python Projects |
Try to calculate the value of Pi using leibniz's series. |
Author: | KemyLand [ Sat Apr 18, 2015 5:45 am ] |
Post subject: | Re: New Python Projects |
muazzam wrote: Try to calculate the value of Pi using leibniz's series. Nah, if he doesn't know Leibniz's series he won't know how to do it. After all, this is about programming, not math (related, but doing the later will distract him from the real objective). BTW, doing that is too easy. |
Author: | Muazzam [ Sat Apr 18, 2015 5:47 am ] |
Post subject: | Re: New Python Projects |
What about creating an (artificial (user-mode)) operating system in Python? (OSDev+Python) |
Author: | KemyLand [ Sat Apr 18, 2015 5:49 am ] |
Post subject: | Re: New Python Projects |
muazzam wrote: What about creating an (artificial (user-mode)) operating system in Python? (OSDev+Python) That's good and introduces him to the matter. |
Author: | KemyLand [ Sat Apr 18, 2015 5:51 am ] |
Post subject: | Re: New Python Projects |
BTW, for the sake of completeness, an example, possible code for calculating Pi using Leibniz's series would be: Code: x = 1
add = False denom = 3 for i in range(32): # Change this if you want more or less precision if add: x += 1.0 / denom add = False else: x -= 1.0 / denom add = True denom += 2 print x * 4 |
Author: | iansjack [ Sat Apr 18, 2015 10:37 am ] |
Post subject: | Re: New Python Projects |
I think it would be more accurate to say that that is one possible way of coding the solution, rather than saying it is the code. It's a rather inefficient and wordy solution, not one that I would like to see used, but it certainly works. |
Author: | KemyLand [ Sat Apr 18, 2015 11:13 am ] |
Post subject: | Re: New Python Projects |
iansjack wrote: I think it would be more accurate to say that that is one possible way of coding the solution, rather than saying it is the code. It's a rather inefficient and wordy solution, not one that I would like to see used, but it certainly works. Well, my Python code has never been too Pythonic and/or short. Now editing the post according to your observations. |
Author: | mac [ Sat Apr 18, 2015 6:28 pm ] |
Post subject: | Re: New Python Projects |
muazzam wrote: What about creating an (artificial (user-mode)) operating system in Python? (OSDev+Python) Do you mean like simply printing a prompt to the screen? |
Author: | cmdrcoriander [ Sat Apr 18, 2015 6:31 pm ] |
Post subject: | Re: New Python Projects |
SeanMc wrote: muazzam wrote: What about creating an (artificial (user-mode)) operating system in Python? (OSDev+Python) Do you mean like simply printing a prompt to the screen? I'm not 100% sure what muazzam meant but I think the idea of creating a shell in Python would be a really fun little project to get started with - something that prints a prompt out and lets you start other programs, explore the filesystem, etc |
Author: | Muazzam [ Sun Apr 19, 2015 1:25 am ] |
Post subject: | Re: New Python Projects |
SeanMc wrote: Do you mean like simply printing a prompt to the screen? I meant a shell and OS with a way to start programs, an API, a 'new' file system (yes, it is also fun), as well as, if you like, a multi-tasking kernel (scheduler), (software) virtual memory. If you like, you can also create a text editor for your OS, emulator for running other OSs and maybe a graphical interface (GUI). |
Author: | cmdrcoriander [ Sun Apr 19, 2015 2:59 am ] |
Post subject: | Re: New Python Projects |
muazzam wrote: SeanMc wrote: Do you mean like simply printing a prompt to the screen? I meant a shell and OS with a way to start programs, an API, a 'new' file system (yes, it is also fun), as well as, if you like, a multi-tasking kernel (scheduler), (software) virtual memory. If you like, you can also create a text editor for your OS, emulator for running other OSs and maybe a graphical interface (GUI). That's a bit extreme for someone who is 'messing around with functions in the interpreter' I think |
Author: | mac [ Sun Apr 19, 2015 11:16 pm ] |
Post subject: | Re: New Python Projects |
That is impossible with Python isn't it? |
Author: | iansjack [ Mon Apr 20, 2015 1:52 am ] |
Post subject: | Re: New Python Projects |
Python can implement this quite easily, but I think it is a ridiculously over-ambitious project for a beginner. For the time being I would stick to simple things, perhaps a few basic games (e.g. the traditional "guess a number game"). You must surely be able to think of things to program - if not, what is your motivation to learn in the first place? |
Page 1 of 2 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |