Create a program that adds 10 to any number I can think of – Interesting!!!

Programming can be a fascinating topic when given the right beginning and level of understanding. Meanwhile, it was known to have had the best 3 most valuable features such as:

  • Formulating problems
  • Breaking them down into meaningful steps to be ascertained
  • Communicating those steps to and with the personal computer.

Activities

input : x

output : 10

Mechanistic Thinking:

Computers can only execute what you ask them to do and they do precisely what is fed, therefore:

 

1    def plus_ten ( x )

2            return x + 10

3     print plus_ten ( 2 )

Tips:

  1. Load any available code editor
  2. Feed the system with the above code
  3. Each line takes a raw entry of the line of code
  4. Ensure to see the file with the right extension, in this case, we are using the .py
  5. Run the program, those using the code editor should select the three dots at the top right corner of the window
  6. Tap on the Execute button

Congratulations!!!

 

About Author


Discover more from SURFCLOUD TECHNOLOGY

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from SURFCLOUD TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading