Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: First time homework help using 2.75

1. ## First time homework help using 2.75

using 2.75
Homework question here: http://imgur.com/aHLYwyQ
I've just started learning python so i'm really lost...
Do I start like

x= year y= months x= 5 y= 9 print x*12 print y/12 + 11
this code is terribly, horribly, wrong, but this is my first time trying to learn python >< any help would be SO appreciated. thank you.

• Hello lunapt,

First, there are some redundancies in your code that I suggest to delete. For instance, do not not assign unnecessary dummy variables. You assign year to x, and then 5 to x. Simply, assign 5 to year; the same goes for months.

Second, you get a wrong result because your formula is wrong. Your assignment asks you to find number of months in year(s) plus some additional months. Thus, your formula should be
Here is the code for the first part of the assignment, the second part is the reverse of the first. You should be able to figure that out. If not, ask.

years = 18
months = 27