Post a New Question

programming

posted by on .

Write a program that will ask the user to enter a person's age, weight and birth month. Your program will compare the entered value to the following and print the appropriate response. Be sure to use modules.

The secret answers: age=25

The comparison: if the guessed age less than or equal to 25

The printed response: Congratulations, the age is 25 or less.

The secret answer: weight= 128

The comparison= If the guessed weight is greater that or equal to 128

The printed response: Congratulations, the weight is 128 or more

The secret answer: birthMonth = 'April'

The comparison: if the guessed month is equal to April

The printed response: Congratulations, the birth month is April


This program to be written in Python and Raptor

  • programming - ,

    For your information, I will tend to respond to posts on programming / computers in which efforts are shown.

    Unlike mathematics, where 2+2 always equal 4 (if we are in the decimal system).

    However, no two computer programs are the same, so every program is a personal version of the answer.

    We can help you correct your coding, or suggest new algorithms, but you need to show your work, please.

  • programming - ,

    I really don't know how to start.. so I have nothing written now

  • programming - ,

    If you really don't know where to start, you may review your teacher's class notes, your text book. If there is none, you can also learn by tutorials, such as:
    http://www.sthurlow.com/python/

    Do you have Python installed on your computer, or you have one available at school? The first part of the tutorial deals with installation of Python on your computer.

  • programming - ,

    The Python Code

    def main():
    age = getAge()
    weight = getWeight()
    birthMonth = getMonth()
    correctAnswers(age, weight, birthMonth)
    def getAge():
    age = input ("Enter your guess for age: ")
    return age
    def getWeight():
    weight = input ("Enter your guess for weight: ")
    return weight
    def getMonth():
    birthMonth = raw_input ("Enter your guess for birth month: ")
    return birthMonth
    def correctAnswers (age, weight, birthMonth):
    if age<=25:
    print "Congratulations, the age is 25 or less"
    if weight>=128:
    print "Congratulations, the weight is 128 or more"
    if birthMonth=="April" or "april":
    print "Congratulations, the birth month is April"
    main()
    you can also learn by Python tutorials, such as:The Python Code

    def main():
    age = getAge()
    weight = getWeight()
    birthMonth = getMonth()
    correctAnswers(age, weight, birthMonth)
    def getAge():
    age = input ("Enter your guess for age: ")
    return age
    def getWeight():
    weight = input ("Enter your guess for weight: ")
    return weight
    def getMonth():
    birthMonth = raw_input ("Enter your guess for birth month: ")
    return birthMonth
    def correctAnswers (age, weight, birthMonth):
    if age<=25:
    print "Congratulations, the age is 25 or less"
    if weight>=128:
    print "Congratulations, the weight is 128 or more"
    if birthMonth=="April" or "april":
    print "Congratulations, the birth month is April"
    main()
    you can also learn by Python tutorials form GURU99

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question