## Need Help with Two Simple Calculating Programs

This is the place for queries that don't fit in any of the other categories.

### Need Help with Two Simple Calculating Programs

Hey, I'm new to this and taking a class in college. I'm really struggling with what seems should be some of the most basic things. The problems I need help with are:

1)A program that calculates and prints the product of two even integers between one to 1000 (I'm not sure why it has to be to 1000).
It should look like:
Code: Select all
The product of even integers from 1 to 7 is: 48

2)Build a small calculator by taking three inputs. Two of which are integer or floats and the third is an input of +,-,/,*. It should then print out a result.

Obviously I don't want the straight out answers, but I barely have an idea where to start. I've tried using while loops and range functions for the first problem but have been unable to organize them in a way to get the results I need.
Thanks all in advance for the help!
I hope this will be the first post of many on this forum and that at some point I will be answering questions like this for people in my position.
-Russ
IllusionaryRooster

Posts: 1
Joined: Fri Oct 04, 2013 12:36 am

### Re: Need Help with Two Simple Calculating Programs

It would be nice if you could show us some efforts you have made, so that we know what parts you understand and what you don't.
That way it's much easier to point you in the right direction in stead of handing you an answer.

You're right to use a loop in the first exercice. Try incrementing a variable on each iteration of the loop and finally returning that variable.
The seconds exercise would contain some if and elif statements to check which operator(+,-,/,*) is passed to the function.
hansn

Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm

### Re: Need Help with Two Simple Calculating Programs

IllusionaryRooster wrote:I hope this will be the first post of many on this forum and that at some point I will be answering questions like this for people in my position.

This is a noble goal and I hope I don't sound too demotivating when I now ask you to please read the thread for new users.
Due to the reasons discussed here we are moving to python-forum.net on October 1, 2016.

This forum will be closed. Please create an account at the new site to continue discussion.

IRC://irc.freenode.net/python-forum
Kebap

Posts: 689
Joined: Thu Apr 04, 2013 1:17 pm
Location: Germany, Europe