Question: Value user _ num is read from input. Write a while loop that iterates until user _ num is negative. In each iteration: Update value

Value user_num is read from input. Write a while loop that iterates until user_num is negative. In each iteration:
Update value result as follows:
If user_num is not divisible by 3, output 'miss' and do not update result.
Otherwise, output 'hit' and increment result.
Then, read a value from input as an integer into variable user_num.
Click here for example
Ex: If the input is:
6
4
9
-2
then the output is:
hit
miss
hit
Result is 2
Note: x%3==0 returns True if x is divisible by 3.
result =0
user_num = int (input ())
''' Your code goes here '''
print(f'Result is result }') Python Coding please
 Value user_num is read from input. Write a while loop that

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!