File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Learn-Python/Fun with numbers Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ #Taking input and converting into float
2+ x = float (input ("Enter a number: " ))
3+ y = float (input ("Enter another number: " ))
4+
5+ #Estimating and printing the result
6+ z = (x + y )
7+ print (f"{ z :,} " )
Original file line number Diff line number Diff line change 1+ #Taking input and converting into float
2+ x = float (input ("Enter a number: " ))
3+ y = float (input ("Enter another number: " ))
4+
5+ #Estimating and printing the result
6+ z = round (x + y )
7+ print (z )
Original file line number Diff line number Diff line change 1+ # Taking input from the user
2+ x = input ("Enter a number: " )
3+ y = input ("Enter another number: " )
4+
5+ # Converting string into float
6+ x = float ()
7+ y = float ()
8+
9+ #Calculating (adding) and printing the result
10+ z = x + y
11+ """
12+ for subtraction z = x - y
13+ for multiplication z = x * y
14+ for division z = x / y
15+ """
16+ print (z )
You can’t perform that action at this time.
0 commit comments