Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
June 2nd, 2013, 04:02 PM
 mostakin
Registered User

Join Date: Jun 2013
Posts: 5
Time spent in forums: 3 h 26 m 9 sec
Reputation Power: 0
Python Programming help

i do not know that what is the python programming. i want to know about this topic.

#2
June 2nd, 2013, 08:52 PM
 b49P23TIvg
Contributing User

Join Date: Aug 2011
Posts: 4,124
Time spent in forums: 1 Month 3 Weeks 2 Days 4 h 49 m 23 sec
Reputation Power: 455
With two transistors your clever electrical engineer can build an inverter. Logically, that's the "not" function. With a few more transistors, we can make an `exclusive or' circuit. Let's examine truth of these circuits. Think of 0 as "no current" or "low voltage", and 1 as "current flows" or "high voltage" (needn't be dangerously high).
Not. One input. One output.
Code:
Input   Output
0       1
1       0
Xor. Two inputs, One output. Let's name the inputs I1 and I2.
Code:
I1 I2   O=I1^I2
0  0    0
0  1    1
1  0    1
1  1    0
Hey! Check this out. If we add 0 + 0 we get 0. And adding 0+1 or 1+0 gives 1. Whoo-hoo. Adding 1+1 give 2. 2? Never mind. With an xor gate (eh...circuit) we can perform all these operations: 0+0, 0+1, 1+0.

Now to stretch your imagination. Let's think about base 10. Ten fingers. Ah, skip this dialog of Roman numerals and the abacus. Let's count with arms. Wait, that won't work. Let's count with lights. We'll use a bright light and an orange light. When the bright light is on it means "1". For the orange light, on means "one group of two ones".
I1 xor I2 controls the bright light;
I1 and I2 controls the orange light.
Now we can add all combinations of addends 0, 1 and represent the result! By extension we envision adding larger numbers. We can think of the orange light as the carry. Oh dear, trouble. Considering the carry, we need three input circuits. Maybe you, along with your clever electrical engineer can think of ways to combine two input circuits using George Boole's fantastic tables to make a three input circuit with the right properties for addition.

Warning: big jumps here. We'll stick a clock onto our circuit, and some memory, and some control circuits. The program indicates which circuits to activate during the clock cycle. The data changes, the computer can move it somewhere.

Python schedules circuit activation. Both humans and the digital circuit can understand the description. Wow! Python is a language for controlling machines. Ignore that machines have moving parts but computers no longer need moving parts.
__________________
[code]Code tags[/code] are essential for python code!

#3
June 2nd, 2013, 09:07 PM
 noobie1000
Contributing User

Join Date: May 2013
Location: /dev/null
Posts: 145
Time spent in forums: 1 Day 10 h 38 m 25 sec
Reputation Power: 18

#4
June 3rd, 2013, 11:16 AM
 Dietrich
Contributing User

Join Date: Feb 2005
Posts: 571
Time spent in forums: 5 Days 2 h 37 m 24 sec
Reputation Power: 63
A real eye opener ...
http://docs.python.org/2/tutorial/

Something practical ...
go to
ideone.com
select python
in the editor area type
Code:
print('hello world')

and submit

Contrast that with C ...
got to
ideone.com
select C
in the editor area type
Code:
#include <stdio.h>

int main()
{
puts("hello world");
return 0;
}

submit and look at the output.
b49P23TIvg agrees: Enchanted to see puts instead of inefficient printf .
__________________
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25

Last edited by Dietrich : June 3rd, 2013 at 11:42 AM.

#5
June 14th, 2013, 05:00 PM
 Marbelous
Registered User

Join Date: Dec 2012
Posts: 21
Time spent in forums: 8 h 31 m 54 sec
Reputation Power: 0
Quote:
 Originally Posted by mostakin Now we can add all combinations of addends 0, 1 and represent the result! By extension we envision adding larger numbers. We can think of the orange light as the carry. Oh dear, trouble. Considering the carry, we need three input circuits. Maybe you, along with your clever electrical engineer can think of ways to combine two input circuits using George Boole's fantastic tables to make a three input circuit with the right properties for addition.

So wait. You're obviously sharp enough to get b4's sarcasm but you post on a forum to ask what is Python? There are more good, basic Python tutorials and free books out there than you will EVER need. Just go Google...

I can never understand WHY people post on forums asking for detailed, basic info. We have better things to do. Like helping other posters with their real problems. No one has time to re-write what is all over the net. Besides, why would you even trust some strange guys answers? He might be be messing with you or... an idiot or something.

If you want to program the FIRST thing you need to accept is that research is a big part of it. No matter how advanced you get you still need to know where to look to find the answers that you need. Might as well start now!
Mekire agrees: Actually he is just a spammer. He cut and pasted his reply out of the body of b4's post.

#6
June 15th, 2013, 09:08 AM
 mostakin
Registered User

Join Date: Jun 2013
Posts: 5
Time spent in forums: 3 h 26 m 9 sec
Reputation Power: 0
tutorial site

you have know my topic then you give me a tutorial site.

 Viewing: Dev Shed Forums > Programming Languages > Python Programming > Python Programming help