## iKyriaki's Profile User Rating:

Reputation: 4 Apprentice
Group:
New Members
Active Posts:
8 (0.02 per day)
Joined:
30-November 12
Profile Views:
2,966
Last Active:
Aug 23 2013 09:48 PM
Currently:
Offline

### Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
XBox
Who Cares
Dream Kudos:
0
iKyriaki has not set their status

1. #### In Topic: Odd or Even Program

Posted 6 Apr 2013

sepp2k, on 06 April 2013 - 03:13 AM, said:

iKyriaki, on 06 April 2013 - 09:52 AM, said:

Also, I didn't see the point in having two variables for the number.

The point was that he kept subtracting from num2 until it was 1 or 0, so he needed num1 to remember what the original value was when he printed the result at the end. When using modulo there is of course no longer any point in having two variables.

Oh yeah, don't know what I was thinking. Well, that little issue is solved at least.
2. #### In Topic: Odd or Even Program

Posted 6 Apr 2013

```print("This is a program to see if an integer is odd or even.")

num = int(input('Enter the number here: '))

if num % 2 == 0:
print('The integer {} is even.'.format(num))
else:
print('The integer {} is odd.'.format(num))
```

Going off of what macosxnerd101 said, just doing the num % 2 == 0 check will make this a lot faster. The reason it takes so long when you input a large number is because it's constantly subtracting two from it to check if it'll be odd or even. Also, I didn't see the point in having two variables for the number. Hope this helps
3. #### In Topic: Problem with Variables

Posted 20 Mar 2013

The problem is this line:
```x = int(input("Your Radius -> ")
```
which should be
```x = int(input("Your Radius -> "))
```

Remember for every open brace you have, a close brace has to follow it.
4. #### In Topic: Looking for advice when self-learning

Posted 2 Dec 2012

Thank you all for the advice! I think I have a clear understanding of what I need to do now.
5. #### In Topic: Looking for advice when self-learning

Posted 2 Dec 2012

When I try to learn the material, I read the text and make sure I can understand the code after reading, then type in the code and make sure it works for myself. Should I just continue doing that? I probably could try to make a few more small programs, since the only ones I've actually "made" are ones from programming guides and one that counted by skipping certain numbers.

### My Information

Member Title:
Age:
20 years old
Birthday:
September 19, 1993
Gender:
Location:
Chicago, Illinois
Full Name:
Demetri
Years Programming:
0
Programming Languages:
Python

E-mail:
Private

### Friends

iKyriaki hasn't added any friends yet.