A program that repeatedly prompts a user for integer numbers :
biggest = none
smallest = none
while True:
input = raw_input(“Enter a number:”)
if(input == “done” break
try:
number = float(inp)
except ValueError:
print “Please enter only numbers”
else
if smallest is None:
smallest = number;
biggest = number;
elif number < smallest:
smallest = number
elif num > largest:
largest = number
Print “Greatest is “, biggest
Print “Smallest is”, smallest
In this program an input is obtained, if it is equal to the word “done”, then the program stops b printing greatest and smallest number in the given input.
If invalid inputs are given then user is prompted to enter valid number. Otherwise the value of smallest and greatest are calculated according to the input using if-else construct.
I think it is C. cross-site scripting
The most appropriate change in this situation would be to change the message "User input deemed invalid" to "You made a mistake, try again, you can".
<h3>What should we change to improve the children's experience?</h3>
To improve children's experience with this new calculator program, we must adapt all the features of the program for children's users. Therefore, the buttons, the messages and everything related to this program must be suitable for their motor and brain development.
Therefore, it is considered that the message "User input deemed invalid" is not suitable for children because they may not understand this message or misinterpret it and desist from using the new program.
So, the most appropriate message to replace the previous message would be:
- "You made a mistake, try again, you can"
Because this message is suitable for the friendly language that children use in their daily lives and they would better understand the message without giving up using the new program or the calculator.
Learn more about programs in: brainly.com/question/13264074
#SPJ1
Answer:
The difference is that a floppy relies on a floppy disk reader to spin its disk, where as a hard drive is a fully enclosed container that has it's reader enclosed as well. A floppy disk is a single plastic film disk, where as a hard disk can have multiple metal disks.
Explanation:
Answer:
See Explanation
Explanation:
Given
The attached function
What the recursion does is that; it adds up individual digits from N to 0
Solving (a): Each output when N = 6
For N = 6.
The function returns the following values:
f(6) = 6
Then: 6 + f(5)
Then: 6 + 5 + f(4)
Then: 6 + 5 + 4 + f(3)
Then: 6 + 5 + 4 + 3 + f(2)
Then: 6 + 5 + 4 + 3 + 2 + f(1)
Then: 6 + 5 + 4 + 3 + 2 + 1 + f(0)
Then: 6 + 5 + 4 + 3 + 2 + 1 + 0 = 21
Solving (b): The output when N = 7
Using the same process in (a) above.
The output is 28