My first real project in python
Hi, I'm 15 and I recently started python. For my firt project I did a calculator.
Here is the program:
num1=int(input("choisissez un nombre"))
num2=int(input("choisissez un nombre")) #sélection des nombres
operator=int(input("choisissez un operateur 1=+ ;2=- ;3=/ "))
if operator ==1:
result=num1+num2
elif operator ==2: #calcule
result=num1-num2
elif operator ==3:
result=num1/num2
print("voici votre résultat",result)
I'm here for advice on this program and more generally on python.
If you have little project like this I take too.
Thank you for reading.
/r/Python
https://redd.it/1p1khap
Hi, I'm 15 and I recently started python. For my firt project I did a calculator.
Here is the program:
num1=int(input("choisissez un nombre"))
num2=int(input("choisissez un nombre")) #sélection des nombres
operator=int(input("choisissez un operateur 1=+ ;2=- ;3=/ "))
if operator ==1:
result=num1+num2
elif operator ==2: #calcule
result=num1-num2
elif operator ==3:
result=num1/num2
print("voici votre résultat",result)
I'm here for advice on this program and more generally on python.
If you have little project like this I take too.
Thank you for reading.
/r/Python
https://redd.it/1p1khap
Reddit
From the Python community on Reddit
Explore this post and more from the Python community