How to write code and run
Here we write some code of python. Do not worry you also able to write such code , first try to learn this , what the information carry in this code.
Open your Python Idle which I explain in my previous blog. Here the link: How to download and install python. When you click on File > New File. Then you see this tab and here write this code.
Step 1: Write the code here and Now click on Run option
Code:
temp= eval(input('Enter a temperature in Celsius:'))
print('In Fahrenheit, that is', 9/5*temp+32)
If you worried here, what is eval stand for and why we use input in this code, then don't worry it only example to show you how code work. In further post I explained everything.
Step 2:- Now click on Run Module(F5) and for shortcut press F5 from your keyboard.
Step 5: After save, A new tab appear where it ask to "Enter a number in Celsius ": 5 (When you press 5 and then press Enter)
This is the basic programmed of the Python language and by follow all these steps you able to get the result of your code. Keep on update on this blog and you learn python from basic to advance.
No comments:
Post a Comment
If you have any doubt, let me know.