[Tutor] list with area calculation

Christoffer Thomsen christoffer81 at mail.dk
Thu Dec 4 04:28:33 EST 2003


Well as Alfred Milgrom wrote, I had 2 entries of "p" defining something 
different.
The Perimeter text is also changed to Length instead of Area. So yes 2 
stupid mistakes.

Alan Gauld wrote:

>>make it work. I am not surprise if it just some stupid mistake
>>    
>>
>but I
>  
>
>>can't figure it out.
>>
>>choice = "p"
>>while choice != "q":
>>    if choice == "s":
>>        width = input("Type width:")
>>        print "Area is: ", square(width)
>>    elif choice == "r":
>>... code snipped ...
>>    elif choice != "q":
>>        print_options()
>>    choice = raw_input("option: ")
>>    
>>
>
>You don't tell us what's going wrong!
>My initial thoughts include the fact that the last
>elif could just be an else, but otherwise, what is the problem?
>
>Alan G.
>
>
>  
>




More information about the Tutor mailing list