Python Forum
Please help me get this code working that i haven't posted yet
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Please help me get this code working that i haven't posted yet
#1
'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
Reply
#2
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 ©
Reply
#3
a=12
b=6
c=a+b
print (c)
Reply
#4
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python code not working garvind25 1 2,702 Jun-24-2020, 09:38 PM
Last Post: Yoriz
  Code isnt working abdullahali 5 3,350 Oct-01-2018, 02:31 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020