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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:10, AdoNice
How can i delete permalinks from a word press site?
Answers: 1
image
Computers and Technology, 22.06.2019 18:40, penelopymorales24
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
image
Computers and Technology, 22.06.2019 20:00, hannahliebl2000
Need asap write a short paper describing the history and differences between six sigma, waterfall, agile, and scrum models. understanding these models can give you a good idea of how diverse and interesting it development projects can be. describe what the rationale for them is and describe their key features. describe the history behind their development. at least 400 words
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, tay9122
Jason, samantha, ravi, sheila, and ankit are preparing for an upcoming marathon. each day of the week, they run a certain number of miles and write them into a notebook. at the end of the week, they would like to know the number of miles run each day, the total miles for the week, and average miles run each day. write a program to them analyze their data. your program must contain parallel arrays: an array to store the names of the runners and a two-dimensional array of five rows and seven columns to store the number of miles run by each runner each day. furthermore, your program must contain at least the following functions: a function to read and store the runners’ names and the numbers of miles run each day; a function to find the total miles run by each runner and the average number of miles run each day; and a function to output the results. (you may assume that the input data is stored in a file and each line of data is in the following form: runnername milesday1 milesday2 milesday3 milesday4 milesday5 milesday6 milesday7.)
Answers: 3
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 in other subjects:

Konu
Computers and Technology, 04.01.2021 22:00
Konu
Arts, 04.01.2021 22:00
Konu
Health, 04.01.2021 22:00
Konu
World Languages, 04.01.2021 22:00