<u>The possible consequences of intentional virus setting:</u>
Virus is nothing but desktop or laptop or tablet OS has to do certain process as on its own which diverse other to different process such us stealing the data from desktop or laptop or tablet and making slow the performance of desktop and laptop and tablet.
To avoid or protect the computer there are two type of antivirus.
- On desktop or tablet or laptop. (It is called resident firewall).
- Internet gateway. (It is called firewall)
So company create virus and to rectify they make money of that process.
To protect our desktop or laptop or tablet from virus we are protected with law. In case due to virus attacked our laptop or desktop or tablet Is effected we can fine the or sent to jail by law.
import random
num_rolls = 0
while True:
r1 = random.randint(1, 6)
r2 = random.randint(1, 6)
print("Rolled: " + str(r1) + "," + str(r2))
num_rolls += 1
if r1 == r2 == 1:
break
print("It took you "+str(num_rolls)+" rolls")
I added the working code. You don't appear to be adding to num_rolls at all. I wrote my code in python 3.8. I hope this helps.
The answer to that is a Pixel
Answer:
1.) 25 ; 15 ; 15
2.) 50 ; 15 ; 50
Explanation:
In the first function written :
The variable val was initially decaled or assigned a value of 25 and that was what was printed first.
However, after the example function was written, the val variable was finally assiagned a value of 15 within the function. However, it was also declared that the global variable takes uonthe val value. Hence, the val variable initially assigned a value, of 25 changes to 15 globally.
For the second code :
From the top:
Val was assigned a value of 50 ;
Hence,
print(val) gives an output of 50
Within the function definition which prints the value of val that is assigned a value of 25 within the function.
Since tbe global variable isnt reset.
Printing Val again outputs 50;since ito is outside the function.