Python Forum

Full Version: Please help me get this code working that i haven't posted yet
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
'Write a program that has 3 variables (a, b and c). a = 12 and b = 6. c should be equal to a plus b.
The program should print c.'
HOW? How would you do it pls. i tried a lot but its not working
Well, assuming this is for school... otherwise you'd provide code...

but let's get you "thinking" :-)

variable
a = 12
b = 6

then we want to add them and assign them to c
c = a+b
then of course we'd want to print them
print ©
a=12
b=6
c=a+b
print (c)
Thank you for posting your code in code tags, what result do you get ? and if you get any errors please show the full error in error code tags