+ 20
What simple python programs can I write with basic python knowledge?
36 Respostas
+ 19
Guess the number, which starts off easy but you can expand the game to track number of guesses, quickest time, least number of goes maybe build a leaderboard.
This helps your understanding variables, while loops, input and output, data validation (what if user enters a string instead of a number) maybe even file functions.
It's a simple program but a great exercise.
+ 15
Create a calculator, it's actually very simple.
It combines all the fundamentals, such as variables, functions, loops, conditions, lists, etc. A physical calculator is something most of humanity takes for granted, and creating a program version of it is a good starting point for any and all programmers. You don't need to do anything fancy, just simple user input (ex: 1 + 2) and the program should return the answer on the console for the user.
+ 9
What does a Raspberry Pi have to with writing Python code "that is actually useful" when Python code is everywhere, on every platform and used in many games for scripting? I'd say Python code is pretty useful without a Raspberry Pi, considering it was around long before they came out. It's certainly very useful on a GNU/Linux system.
+ 8
I used to teach Python and I created this two-part presentation with lots of explanations and exercises, I think it's a good starting point! By the end of it, you can create some simple, quite cool programs to run on the terminal :)
Part 1: https://www.slideshare.net/silviacat/introduction-to-python-part-12
Part 2: https://www.slideshare.net/silviacat/introduction-to-python-2-part-22
Enjoy coding :)
+ 7
when you say basics I am assuming you have not done OOP yet so how about you try creating functions to do math algorithms like length of a line, area of triangle, unit conversions, prime numbers and statistics like mean, median,mode.
+ 6
You would need to make some OS-specific calls to make a keylogger in Python AFAIK. Anyway, we're talking simple here, OP asked for basics.
+ 6
an age calculator is a decently basic piece of code. You can add different ways to calculate the age, either in seconds, minutes, hours, days, etc. or try having it return all options of the persons age. I think it can help to build a logical thinking too depending on how you write it.
+ 6
depends on your project needed.
+ 5
u can make a keylogger with python if u have interest in hacking
+ 5
Check this website it gives you ideas:
www.hackerrank.com
+ 4
Quiz application with questions randomly picked from prepared text file?
+ 4
You are only limited by your imagination,python is powerful.
+ 3
Not to advertise my own code, but games like this (run with QPython or on PC, it doesn't run on SL's crappy emulator). It's a puzzle game using text-based graphics:
https://code.sololearn.com/czaQlg5dZoU7/?ref=app
+ 3
simple calculator
+ 3
A simple calculator program is good for a start. Since that'll you more insights on using the OOP concepts and defining and using of methods etc.
Well, if you're interested in more projects, you're more than welcome to visit my blog for Python mini projects and Kotlin tutorials.
https://technopediabuzz.blogspot.in/?m=1
Thank you. :) :D
Stay motivated; keep Coding! :D
+ 2
depends on the language your code is in, as to how to to convert to application
+ 2
for one, do you mean gui (graphical user interface) applications with buttons and drop down menus. because anything you write with any programming language can technically be an application
+ 2
different types of calculators. whether that be a gas mileage calculator, tip calculator, bmi calc etc... they all share the same concept which is take user input and do some math with that input to give the user an output(ex take miles driven, the average price of gas, and their mpg to output the price for a trip)
+ 2
A calculator?
+ 2
String manipulation is also a fun way to start. Something like this not only teaches you the basics of strings, but also if statements, loops and possibly recurssion:
https://code.sololearn.com/c97qjzDoYLDL/?ref=app
https://code.sololearn.com/cPu9v9lmPfN1/?ref=app