Can I ask a question about python that will be answered? Real python questions, not coco. Else, could you recommend another coding site that I can ask a python question on?

# Can I ask a python question?

2 Likes

Yes, I think I could answer some questions, I do do actual Python.

```
def um(a):
count=0
w=input("If you're done, type (\'d\'). What are your numbers? (One at a time, please) : ")
while True:
if w==1:
break
else:
h.append(w)
for i in h:
count+=i
return count
def product():
h=[]
while True:
w=input("If you're done, type (\"d\"). What are your numbers? (One at a time, please) : ")
if w=="d":
break
h.append(w)
count=1
for i in h:
count=count*i
return count
def quotient():
a=input("Divisor: ")
b=input("Dividend: ")
h=input("With remainder (r), or not (n)?: ")
h=h.lower()
if h=='r':
x=int(a/b)
y=a%b
c=f"The number is {x}, and the remainder is {y}!"
return c
elif h=="n":
s=a/b
return s
def difference():
a=input("Minuend: ")
b=input("Subtrahend: ")
c=a-b
return c
def exponent():
a=input("What number?: ")
b=input("What exponent?: ")
c=a**b
return c
def calculator():
'''
Literally a calculator
'''
while True:
w=input("Multiplication (m), Division (d), Subtraction (s), or Addition (a), Exponent (e), or Put away your calculator (p)?: ")
w=w.lower()
if w=="p":
break
if w== "e":
exponent()
if w=="s":
print(difference())
if w=="d": #division
return print(quotient())
if w=="a": #addition
return print(um())
if w=="m": #multiplication
return print(product())
print("Cha-Chok.")
calculator()
```

I’m trying to make a calculator (for fun) and It doesn’t work.

Checked only the Multiplication:

```
def product():
# code
h.append(w) # error: make all computed string values numbers
h.append(float(w))
```

and the product will work. The other functions also have similar errors. Checked the code in http://pythontutor.com / The input screen is bottom left /

I support the idea to have two new sections: **JavaScript/CoffeScript/ Help** and **Python Help** where to post similar questions.

At this site you can also get live help.

3 Likes

THANK YOU SO MUCH!!