Learn with steem || Code with Python IDE (Pydroid 3) "Lecture day 1" || @preye2

in CampusConnect3 years ago (edited)

Hello Friends,

20220605_192505_0000.png

Programming is fun and interesting when our codes run effectively with no errors. Nevertheless, debugging of errors makes a programmer to understand and remember his/her codes easily, because mistakes usually makes us better and more informed.
It's always advisable to start from the basics, but for today's lecture, I would love to quickly run a small program that can be used to design shapes and pictures.

Programming may seem simple to some persons, while to others programming is very difficult. But if you ask me, I think it majorly depends on the programming language that is used. Because some programming languages are very much difficult to code with and to understand than others due to their different scripting patterns.

I would love to teach you guys how to code using Phyton Programming Language, because I think this is the best and most easy programming language to code with (especially for beginners) due to the fact that it is very similar to English, which means even a beginner can read and understand it's codes.

The only major challenge which I discovered about this programming language is that it takes its Spacing seriously. I mean a programmer could stay awake all night debugging, only to find out that there's an extra space in his code, which is why the program won't run. So basically, the solution is to be very careful while coding to avoid unnecessary errors.

One of the major reasons I love coding with Python is that it has an already prepared library where users can import and create wonderful results. For today's coding, I will be importing from the turtle Python module.

But before I continue I would love tell my students that you can code using your Android phone, it doesn't necessarily mean you must have a laptop💻 or desktop 🖥️. So to proof that, I will be using a Python programming IDE (Pydroid 3) which I will recommend for my students.

  • You can easily get the Pydroid 3 IDE on Google Play Store
  • And after installing it, you can open it

  • As you can see, the GUI is clear and understandable, like on the top right hand corner(3 dots) you would see that they is Undo, Redo, Search, and the Go to line.

As a programmer you should know that these tools are very important during coding/debugging.

  • On the bottom part, you could see the various symbols used in programming, which are very familiar to humans. Like the =,<>,;,:"" and so on....

iMarkup_20220605_150701.jpg


So without wasting time I would like to write a short and simple code that would perform the task of designing something really beautiful for us..

My first line of code will be to import the turtle graphic design which has already been prepared in the Python library. So I typed "import turtle" on the first line.

For the second line, I am giving turtle a function, so I can say let Steemit be the turtle. In coding, I will say "steemit = turtle.Turtle()" after that I click enter to proceed to line 3.

iMarkup_20220605_154546.jpg

So line 3 would basically be about the speed of my design(for moving images), which I would set as "9". In coding it's "steemit.speed (9)", and I proceed to line 4.

I want to give my design a color of my choice, so I would go for blue my favourite color. In coding it's "steemit.color ('blue')" then I proceed to line 5.

iMarkup_20220605_154632.jpg

This is where I would give that actual command, and tell the program what to do

So I want my program to draw and design a circle-like image going anti-clockwise, and so I gave the program that instructions using the code "for i in range (50):
steemit.circle(150)
steemit.left (50)"
and we are done.

iMarkup_20220605_154726.jpg

So it's time for me to test-run my program to see if it would detect any error. So I click on the play button.

GIF-220605_121132.gif

As you can see our program is running smoothly, and every programmer would be happy to see a positive response from his code.

I could add extra colors if I so desire or better still I could change the color, see example below(changed to green):


Coding is really very interesting and broad, which means we learn new things everyday as we code. This is just a demo of what I would be giving to my students, as I urge you guys to follow and try out this course, it will really be interesting and I promise you would learn alot from my class.
We really need this, because there are lots of jobs out there for programmers, and we would'nt learn everything in school, so I would be dropping something really awesome in my next class, and I would want to see some seriousness in my students. Please this is Steemit, and we are here to learn, so you are free to ask me any kind of question you so desire in the comment section, am here for you.

@offia66
@josepha
@starrchris
@sahmie

I would be very glad if we download the Pydroid 3 IDE and explore the code. Thanks you for your time here ❤️..

Note: All pictures and screenshots are taken by me on the Pydroid 3 IDE.

Steem to the world💯.....
Sort:  

Please use a single tag that indicates which domain your article belongs to, you cannot benefit from two upvotes from sc09 and sc05.

 3 years ago 

Please But this post covers every field, consider and curate him please 🥺.

Yeah bro, that was really want I was thinking, and that's the reason I used the both tags, but I know clearly understand that only a single domain is needed for per post. Thanks alot for your support, I really appreciate ❤️

Ok @steemcurator05, your point is clear and I have corrected it.

 3 years ago 

Wow
You have really done a great job man, I really learnt something new today, thank for sharing such awesome knowledge. Thank you very much.

Thanks for checking out the lesson, am glad you learnt something new, it always nice to broaden our programming skills with codings like this. I really appreciate your time here ❤️

Honestly speaking I love programing and I must say that I love learning it because it gives me joy. And from what I have read from your post you must be a good programmer. Please keep it up because is the job that selling now.

You are right sir, learning programming and improving in it comes with alot of joy, and am glad you've experienced it. Thanks for your recommendation and remark, I really appreciate ❤️

Thank you for contributing to #LearnWithSteem theme. This post has been upvoted by @Reminiscence01 using @steemcurator09 account. We encourage you to keep publishing quality and original content in the Steemit ecosystem to earn support for your content.

Club Status: #Club5050

Sevengers Comment GIF.gif

Regards,
Team #Sevengers

Great job! Got to respect the use of a mobile-based IDE for accessibility! Hopefully potential students will get interested enough to follow it up by installing an IDE on their PC.

It's always great when we get mobile IDE too for running of programmers, your time here is greatly appreciated.

Good idea to use the Turtle too. I always think that graphics programming is a lovely way to teach, because the results are so immediate. Look forward to reading more of your work.

Your post is manually rewarded by the @nftmc Community Curation Trail.


Join the NFTMC community to get rewarded.

USE TAG - #nftmc

Curation Trail- @nftmc
Discord- https://discord.gg/5P57gwYYcT
Twitter- https://mobile.twitter.com/NFTMC3

 3 years ago 

This programming of a thing is something interesting, its not my field though, but I hope to give it a try someday.
Great lesson.

Programming is sweet ooh, especially when your code runs successfully. It will be lovely if try out some of these programs, I promise you won't regret it.

@preye2 Hope you are doing well in life . I have a small proposal/offer for you. if you could take out few minutes to listen. i will be gladfull. if you like the offer you join, otherwise no problem. I promise you won't regret it 🙏🙂

@preye2 hope you are doing good in life. you have 500s.p in your account which is generating hardly 1 steem in a month as curation rewards. if you vote also it will hardly add any value. now the offer is that delegate 300-350s.p to nftmc and get daily support from the community with 15-25X times. alone its very difficult to grow account and with community you can grow faster. try this as a trail for just 1 month if you dont see any good results. cancel delegation immediately, but i am giving my promise and words you wont regret. 🙏🙂 if you have any questions please feel free to ask and join our discord.🙏🙂

Ok @nftmc, I will delegate 350 to nftmc

@preye2 please find the link for 350s.p delegation. You can use steemworld.org also for delegation. 🙏🙂

https://steemlogin.com/sign/delegate_vesting_shares?delegator=preye2&delegatee=nftmc&vesting_shares=635329.676448%20VESTS

Once done, please confirm so that I can add you to list of delegators. 🙂🙏

 3 years ago 

Interesting article.
I have the interest of learning programming, and thank God I have meet a tutor over here. I will follow your lessons from now onwards.

You are always welcome to my class my very good friend, and I promise you will learn alot from my lectures. Your time here is greatly appreciated.

 3 years ago 

@preye2, Thanks for sharing with us on @campusconnect Thanks

This post was upvoted by @dayographix using community account.

Thanks for the support, I really appreciate.