Answer:
10000000000
Explanation:
While a typical byte only goes up to 8 digits, you can expand past that by having each integer past the initial 8 just double the amount from before
Answer:
what are the options?
reply in comment so i can help:)
Answer:
def compute_pay(number_of_hours, rate_of_pay):
if number_of_hours > 40:
pay_for_week = (40*rate_of_pay)+((number_of_hours-40)*\
(rate_of_pay+rate_of_pay*0.5))
else:
pay_for_week = number_of_hours*rate_of_pay
if pay_for_week >= 375:
print("Paying %d by direct deposit" % pay_for_week)
else:
print("Paying %d by mailed check" % pay_for_week)
Explanation:
- We define the computer pay function that receives the number of hours worked in a week and the rate of pay
- From the test cases we deduce that if a worker works more than 40 hours a week an extra payment is given, you can calculated it as follow: (40 * rate_of_pay) + ((number_of_hours - 40) * (rate_of_pay + rate_of_pay * 0.5))
- If a worker works less than 40 hours the payment is calculated as follow: pay_for_week = number_of_hours * rate_of_pay
- If the pay for week is equal or greater than 375 we print a payment by direct deposit otherwise we print payment by mailed check
Answer:
def display_factors(num):
for counter in range(1, num+1):
if num % counter == 0:
print(counter)
int_num= int(input("Enter a number : "))
print("The factors for {} are : ".format(int_num))
display_factors(int_num)
Explanation:
The function display_factors is used to display all factors of a number entered by a user.
- In this for counter in range(1, num+1) the for loop is iterated until counter is greater to num is false. Counter variable starts from 1 and ends when it gets greater than the input number.
- if num % counter == 0: In this statement, each loop iteration, checks whether a number (num) is exactly divisible by counter. It is the condition for counter to be a factor of num.
- print(counter) This is used to display factors of an input number
- int_num= int(input("Enter a number : ")) This statement asks user to enter a number (int_num) which will be an integer.
- display_factors(int_num) This calls display_factors number to find the factors of an input number.