Answer:
import random
score = 0
for i in range(5):
num1 = random.randint(1, 100)
num2 = random.randint(1, 100)
prompt = "What is " + str(num1) + "+" + str(num2) + "?"
answer = int(input(prompt))
result = (num1, num2)
if answer == result:
print("Well done!")
score += 1
else:
print("incorrect")
print("Your score was", score)
Explanation:
Your error is on <em>line 7</em>, where you are providing multiple arguments to the input function, instead of 1.
One way to solve this is to create a variable prompt and concatenate all strings and variables within that variable to use for the input.
There is no question here but it might be paint
Answer:
- You need to create a variable outside (before) the input loop.
- You need a variable inside your loop that temporarily holds the user input.
- In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.
I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.
<u>Code (Python)</u>
largestnum = 0
for x in range(6): <em>#loops 6 times</em>
newnum = int(input("Enter a number: ")) #ask user for input & converts to int.
if newnum > largestnum: <em>#if new number is greater than largest num </em>
largestnum = newnum <em>#make it the largest number</em>
<em> </em>print("Largest:", largestnum)
The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.
Answer:
The answer is D Check workstations on Lan for APIPA configuration.
Explanation:
1)
While investing an email issue, a support technician discovers no user can access their email accounts on the company’s email server connected to the private LAN.
Pinging the email server form several workstations on the LAN results in 0% packet loss.
Check workstations on Lan for APIPA configuration next step the technician should take in troubleshooting the issue.