473,657 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What would be a good first program for a seasoned programmer who is new to python?

1 New Member
I know a number of programming languages, including Basic (etc...), C (etc...), HTML/Javascript/CSS/Java/PHP among others. I am learning for self-pleasure, but obviously I can and do put it for use towards financial gain sometimes.

Essentially, starting a fairly simply language such as Python from the basics is incredibly unstimulating. I was thinking of diving head first by creating my own program (any suggestions as to complexity?) and learning it that way. Does anyone else have any experience or input?
May 7 '21 #1
1 3931
Banfa
9,065 Recognized Expert Moderator Expert
Implement some maths formula e.g. Sieve of Eratosthenes or some other prime number generator. That's usually my first call when trying out a new language as it involves control structures and printing data and/or writing files.

Implement a simple(ish) search routine, can you find all the occurrences of a word in a file? Can you extract all matching lines? Can you extract all matching lines only once even if the word appears on some lines more than once?

Slightly depends if you have a use in mind in which case something related to that use.
May 18 '21 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

220
18998
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have any preconceived ideas about it. I have noticed, however, that every programmer I talk to who's aware of Python is also talking about Ruby. So it seems that Ruby has the potential to compete with and displace Python. I'm curious on what basis it...
34
5105
by: Brandon J. Van Every | last post by:
What do you think of this Python logo? http://pythonology.org/logos Good, bad, indifferent, love it, hate it? -- Cheers, www.indiegamedesign.com Brandon Van Every Seattle, WA Brandon's Law (after Godwin's Law): "As a Usenet discussion grows longer, the probability of
22
6306
by: Brad Tilley | last post by:
Is it possible to write a file open, then read program in C and then call the C program from a Python script like this: for root, files, dirs in os.walk(path) for f in files: try: EXECUTE_C_PROGRAM If possible, how much faster would this be over a pure Python solution?
28
3340
by: joe | last post by:
I have a simple .NET application with two or three listViews which are filled with icons and when the user click on the proper item, they display the related images. I use "image = null ; " for all images that have been used and are going to be closed. This is how ever no way to reduce the memory consumption. I have noticed , using the task manager, that garbage collector doesn't actually do any collections unless the computer becomes low...
4
5730
by: KB | last post by:
Hi, I want to write a Python script that controls and automates a Windows GUI computation program. My problem is that I do not know how to quit the Windows GUI program gracefully with a command (program's or Python) in Cygwin. 'kill' or CTRL-C command in Cygwin does not finish it gracefully, meaning that some outputs do not come out normally. The only thing I know is to click 'File-Exit' menu, but
5
5422
by: cj | last post by:
Thanks to everyone that has helped me. Now I'm trying to write my first program. I have an example of one that I need to write about. Any help getting me started is appreciated. I'm having trouble getting my compiler to work, access to my a drive is denied, anyone know why this is? Ok here is the info for my program: The two laws of electricity are used in this program. Law #1 The first is Ohm's Law which relates voltage, curret, and...
26
2246
by: mwt | last post by:
Hello. Today I wrote my first program in C. It adds up the elements in an array. I am just beginning to learn this language. Any tips or pointers about better ways to write/structure/format/etc. this code would be much appreciated. Thanks. mwt. #include <stdio.h> int add_array(int arr, int arr_size) {
18
3126
by: ben.carbery | last post by:
Hi, I have just written a simple program to get me started in C that calculates the number of days since your birthdate. One thing that confuses me about the program (even though it works) is how global variables and function returns work... For example, I have a global array "char datestring;" which is defined in the function speakdate. speakdate just converts a set of integers (date variables) to a string.
3
2165
by: Jason Taylor | last post by:
I am wanting to learn C++, and am curious what my first program should be. I learned PHP by reading the docs as I wrote a news posting script. Any ideas on how I would go about starting my trek in C++?
21
1395
by: =?ISO-8859-1?Q?Rog=E9rio_Brito?= | last post by:
Hi, All. I'm just getting my feet wet on Python and, just for starters, I'm coding some elementary number theory algorithms (yes, I know that most of them are already implemented as modules, but this is an exercise in learning the language idioms). As you can see from the code below, my background is in C, without too much sophistication. What I would like is to receive some criticism to my code to make it more
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.