subject

Write a python function to compute a certain number to a given power. The program should continue asking the user for number and power and display the result until the user enters 0 as the number. Note: don't use the power function of Python. Compute the power using a for or a while loop.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
These tools give presenters more freedom to move about the room and interact with their audience. laptop computer laser pointer lcd projector remote control
Answers: 2
question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u Ò’ ` Ò‰€ 0 then 6: return . 1 or fewer elements already sorted 7: else if u Ò’ ` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp Ò† a[u] 10: a[u] Ò† a[`] 11: a[`] Ò† temp 12: end if 13: else . 3 or more elements 14: size Ò† u Ò’ ` + 1 15: twothirds Ò† d(2 Γ’β€” size)/3e 16: g-sort-recurse(a, `, ` + twothirds Ò’ 1) 17: g-sort-recurse(a, u Ò’ twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds Ò’ 1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 24.06.2019 14:30
Two students are discussing electricity that has a frequency of 60 hz. student a says that this type of electricity is referred to as ac. student b says that in this type of electricity, the electrons flow in only one direction. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
question
Computers and Technology, 24.06.2019 21:40
Which of these is not a type of socket? aga (alternating grid array) pga (pin grid array) spga (staggered pin grid array) lga (land grid array)
Answers: 1
You know the right answer?
Write a python function to compute a certain number to a given power. The program should continue as...
Questions
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
question
English, 30.05.2020 11:58
question
Mathematics, 30.05.2020 11:58
Questions on the website: 13722360