0
How can i code calculations am a beginner
Calculation coding
8 Answers
+ 7
Please specify...
+ 6
Please show us your code so we may help you.
+ 2
Why don't you do more of the Python tutorial then see what you don't understand after that?
You barely started with it...
+ 1
What language? Also what your question is too broad, try narrowing it down.
I will answer for java.
first define the type (int or long for whole numbers, float or double for numbers with decimals)
use the equals operator "=" to assign values
so
int sum = 9;
assign the number 9 to the varible sum.
you can directly use the +×÷%.
so you can create variables to calculate numbers or do it directly
example:
int a = 3;
int b = 7;
int sum = a + b; //sum = 10
//or do it directly
int sum2 = 3 + 7 // also equal to 10
/* to compare two numbers as a Boolean (true or false) use ==
0
Have tried to code but not getting it on python
0
K
0
What are you trying to do using python the more details for what you are trying to accomplish and how you are doing it the esiar it will be for others to help you