subject

Now the hard task! 1 Write a function that gives the users four random integers between 1 and 10 and ask them to enter the square number of them. If the user answers all of them correctly, congratulate them. Otherwise, show them the right answer
# Step e: Import numpy -- ALWAYS import all the Libraries you need at the beginning! import numpy as np #Step 1: Function creation -- refer to the Last Lab for the syntax of function creation # does our function take parameters? * Create your function here:|| #Step 2: Create an array of four random integers between 1 and 10 #Step 3: Print your numbers #Step 4: Prompt the user to enter four numbers, ONE AT A TIME. Use a Loop to store these four numbers in a new array # HINT 1: We could take all four numbers in through one Line, but to practice Loop, Let's do it the hard way # HINT 2: You can start by creating an empty array -- np. array([]), then appending to it one at a time # HINT 3: Remember, input() only returns STRINGS. You need to turn them into integers #Step 5: Now that you have the two arrays, you can compare them using array functions and decide whether the answers are correct # HINT 4: To compare two arrays, you can use array1 == array2 -- however, you have to use a variable to hold the result The resulted array is an array of Boolean values. To quickly check whether it contains true value, you wight want to use the all() or any function...

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
You know the right answer?
Now the hard task! 1 Write a function that gives the users four random integers between 1 and 10 an...
Questions
question
Computers and Technology, 03.02.2020 00:54
question
History, 03.02.2020 00:54
Questions on the website: 13722363