#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    6
    Rep Power
    0

    Need help with home work.


    Hello i have a home work in python and i ant slove that.
    Two qustion .

    number one :
    llow the user to enter two numbers, the first number is smaller than
    the second number. Output “Programming is fun” between the intervals of
    the two numbers except for when 5 is a factor of the number of the interval
    then the program will output “DONT FORGET TO COMMENT”


    number two:
    PAWAP to output a list of squares of positive integers as long as the
    difference between the squares is less than 50. The user will input the
    number



    i can use only if,print,loop,random. (no list)

    Thank for any help
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Location
    Iran
    Posts
    149
    Rep Power
    139
    And what you have done so far in terms of writing code?

    Comments on this post

    • salem agrees : A good question!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    6
    Rep Power
    0
    Originally Posted by dariyoosh
    And what you have done so far in terms of writing code?

    I did the inputs but its not correct .
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,854
    Rep Power
    481
    Many python notations are used for strings.

    'DON\'T FORGET TO COMMENT'
    "DON'T FORGET TO COMMENT"
    r'DON\'T FORGET TO COMMENT'
    r"DON'T FORGET TO COMMENT"
    '''DON'T FORGET TO COMMENT'''
    """DON'T FORGET TO COMMENT"""

    I'm sure there are more.

    What sort of help do you expect? We cannot suggest code improvements without knowing what you've got.

    Please follow the link at my signature to find out how to preserve critical python spacing in your posts.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo