iKyriaki's Profile User Rating: -----

Reputation: 4 Apprentice
Group:
New Members
Active Posts:
8 (0.01 per day)
Joined:
30-November 12
Profile Views:
3,153
Last Active:
User is offline 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
Your Car:
Who Cares
Dream Kudos:
0
Icon   iKyriaki has not set their status

Posts I've Made

  1. In Topic: Odd or Even Program

    Posted 6 Apr 2013

    View Postsepp2k, on 06 April 2013 - 03:13 AM, said:

    View PostiKyriaki, 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.

My Information

Member Title:
New D.I.C Head
Age:
21 years old
Birthday:
September 19, 1993
Gender:
Location:
Chicago, Illinois
Full Name:
Demetri
Years Programming:
0
Programming Languages:
Python

Contact Information

E-mail:
Private

Friends

iKyriaki hasn't added any friends yet.

Comments

iKyriaki has no profile comments yet. Why not say hello?