- Upvotes Received
- 2
- Posts with Upvotes
- 1
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Learning to Program, so be nice :)
Hi, I was working on a solution to problem ten of Project Euler, which states: > The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. > Find the sum of all the primes below two million. I've got code that solves this … |
|
Re:
I'm learning python 3 and I'm having problems with string related excerises. One exericse I'm working on is to write a program that cycle through a string and dispaly it like this: s u p e r n a t u r a l u p e r n a … |
|
|
Re:
Any good places to start learning Python? Websites/books/Youtube tutorials? Also any good editors, too? |
Hey, I tryed the first problem of the Euler project, but for some reason the code bellow is not give me the correct answer: def multiple_sum(multiple=3): x = 0 for n in range(0, 1000): if not (n % multiple): x += n return x print multiple_sum(5) + multiple_sum(3) It is … |
|
Re:
can this thing below work????? {#include<iostream.h> #include<conio.h> #include<stdio.h> char value; char t, u, v; char answer; void Binary2Decimal() { switch(t){ case 'a': //ok cout<<endl<<"[BINARY TO DECIMAL CONVERSION]"<<endl; cout<<endl; long b2,f2=1,d2=0; cout<<"Enter a Binary number: "; cin>>b2; cout<<"\n\n"; while(b2>0) { if((b2%10)==1) { d2=d2+f2; } b2=b2/10; f2=f2*2; } cout<<"Decimal equivalent is: "<<d2<<endl; … |
|
I getting an error when I try to run this function here: def get_char_out(prompt=None): while True: try: return str(raw_input(prompt + ' ')) break except ValueError: print '\nInvaild input' print get_char_out('String, please') I keep getting this error here: String, please Traceback (most recent call last): File "main.py", line 11, in get_char_out('String, … |
|
`print 'Hello world'` Hi all. I am Brett Warren of the UK, a school student learning to program in C++ and Python in my spare time. I look forward to getting to know this place, as first impressions are extremely positive. |