On Sunday, January 26, 2020 at 3:26:40 PM UTC, Dan Purgert wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA256
>
> ferzan saglam wrote:
> > Hello people, I have written the code below which works fine, but it
> > has one small problem. Instead of printing one (x) o
Hello people, I have written the code below which works fine, but it has one
small problem. Instead of printing one (x) on the first line, it prints two.
I have tried everything in my knowledge, but cannot fix the problem.
Thanks for any help in advance.
for x in range ( 0, 10):
Hi People, I am working on a simple calculator which uses operands (+-*/).
The program allows me to choose an operand and enter the first two values, but
when it gets to doing the maths, it gives me an error on
"console.log ("The result is ", res);" under the + operand.
(error code reads: Println
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 41.8.
print('Enter the total cost of the meal')
Tot
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 41.8.
print('Enter the total cost of the meal')
Tot
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
print('Enter the total cost of the meal')
Tot
The code below which I have written should print the result of 43.6 with the
given values I have included at the end of this question, but for some odd
reason I get the result of 44.44.
bill = (input("Enter the total cost of the meal: \n"))
On Wednesday, October 30, 2019 at 2:19:32 PM UTC, Matheus Saraiva wrote:
> m 30/10/2019 08:55, ferzan saglam escreveu:
> > total = 0
> > while True:
> >
> >print('Cost of item')
> >item = input()
> >
> >if item != -1:
I have tried many ways to stop the infinite loop but my program doesn't seem to
stop after 10 items! It keeps going...!)
---
total = 0
while True:
print('Cost of item')
How can I stop this code when -1 is typed or at a maximum item count of ten.
At the moment the code seems to be in a infinite loop meaning it keeps on
asking for an entry until -1 is typed
total = 0
while True:
10 matches
Mail list logo