subject

Consider the following code:
a) num = int(input("enter a number, negative to stop"))
b) while (num > = 0):
print ("you entered: " + str(num))
c) num = int(input("enter a number, negative to stop"))
print ("done.")
what is wrong?
d) the num > = 0 test condition is not correct
there is nothing wrong with the code.
the line num = int(input("enter a number, negative to stop")) should be indented so it is inside the loop
e) there should not be a : after the while (num > = 0)

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Report all segments of identity by descent longer than 20 polymorphisms between pairs of individuals in the following cohort of 15 individuals across 49 polymorphisms: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 numeric input 2 points possible (graded) you have 2 attempts to complete the assignment below. for example if the sequence is "bcd", which occurs in "abcdef" , the starting point would be 2 (b), and the finishing point would be 4(d). individuals 7,10 between positions
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
Which feature of a blog to restore and retrieve older post
Answers: 3
You know the right answer?
Consider the following code:
a) num = int(input("enter a number, negative to stop"))
b)...
Questions
question
Mathematics, 05.03.2021 20:20
question
Biology, 05.03.2021 20:20
question
Mathematics, 05.03.2021 20:20
question
Mathematics, 05.03.2021 20:20
question
English, 05.03.2021 20:20
question
Social Studies, 05.03.2021 20:20
question
Biology, 05.03.2021 20:20