[Tutor] adding quotation marks around variables

Alan G alan.gauld at freenet.co.uk
Mon Jul 11 06:09:23 CEST 2005


> Hello all, I am a college student and I am currently working 
> on a two numbers program for our class, The purpose of this 
> program is to take user input and do some math functions. 

So why not show us what you have come up with so far and we'll 
work from there?

> I have figured out how to do the math but I need to display 
> these two variables with quotation marks around them. 

Personally I'd use string formatting for that.
Take a look at the Simple Sequences topic ofmy tutorial for examples.

> Also I need to add these two variables together  and display 
> the hexadecimal of these two variables???

Again string formatting can help.

> Also how do you display wheather one variable is greater 
> than or less than or equal to the other variable?

Use a branch with a boolean expression.
The Branching topic of my tutor covers that.

Have a go and let us see where you are having problems. 
You will learn much faster if you try it before asking.

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld


More information about the Tutor mailing list