answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
netineya [11]
2 years ago
15

Write code that determines the number of full days represented by the number of hours stored in the variable hours and stores th

at value in the variable full_days. For example, the number of full days in 50 hours is 2. Ignore any leftover hours that don't contribute to a full day. Assume the value of hours has already been initialized. Solve It!
Computers and Technology
1 answer:
taurus [48]2 years ago
4 0

Answer:

hours = 50

full_days = int(hours / 24)

print("The number of full days in " + str(hours) + " hours is " + str(full_days))

Explanation:

Initialize the hours

Since there are 24 hours in a full day, divide the hours by 24. Note that you need to typecast it to the int, because the result is a decimal value by default

Print the values as requested

You might be interested in
Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named constant in several sta
mihalych1998 [28]

Answer:

The advantage for the above condition is as follows:-

Explanation:

  • If a user creates a defined constant variable and assigns a value on its and then uses that variable instead of the value, then it will a great advantage.
  • It is because when there is a needs to change the value of that variable, then it can be done when the user changes the value in one place. There is no needs to change the vale in multiple places.
  • But if there is a value in multiple places instead of a variable and there is no constant variable, then the user needs to change the value in multiple places.
7 0
2 years ago
Create a single list that contains the following collection of data in the order provided:
ivann1987 [24]

Answer:

A code was created to single list that contains the following collection of data in the order provided

Explanation:

Solution

#list that stores employee numbers

employeee_numbers=[1121,1122,1127,1132,1137,1138,1152,1157]

#list that stores employee names

employee_name=["Jackie Grainger","Jignesh Thrakkar","Dion Green","Jacob Gerber","Sarah Sanderson","Brandon Heck","David Toma","Charles King"]

#list that stores wages per hour employee

hourly_rate=[22.22,25.25,28.75,24.32,23.45,25.84,22.65,23.75]

#list that stores salary employee

company_raises=[]

max_value=0

#list used to store total_hourly_rate

total_hourly_rate=[]

underpaid_salaries=[]

#loop used to musltiply values in hourly_wages with 1.3

#and store in new list called total_hourly_rate

#len() is used to get length of list

for i in range(0,len(hourly_rate)):

#append value to the list total_hourly_rate

total_hourly_rate.append(hourly_rate[i]*1.3)

for i in range(0,len(total_hourly_rate)):

#finds the maximum value

if(total_hourly_rate[i]>max_value):

max_value=total_hourly_rate[i] #stores the maximum value

if(max_value>37.30):

print("\nSomeone's salary may be a budget concern.\n")

for i in range(0,len(total_hourly_rate)):

#check anyone's total_hourly_rate is between 28.15 and 30.65

if(total_hourly_rate[i]>=28.15 and total_hourly_rate[i]<=28.15):

underpaid_salaries.append(total_hourly_rate[i])

for i in range(0,len(hourly_rate)):

#check anyone's hourly_rate is between 22 and 24

if(hourly_rate[i]>22 and hourly_rate[i]<24):

#adding 5%

hourly_rate[i]+=((hourly_rate[i]/100)*5)

elif(hourly_rate[i]>24 and hourly_rate[i]<26):

#adding 4%

hourly_rate[i]+=((hourly_rate[i]/100)*4)

elif(hourly_rate[i]>26 and hourly_rate[i]<28):

#adding 3%

hourly_rate[i]+=((hourly_rate[i]/100)*3)

else:

#adding 2% for all other salaries

hourly_rate[i]+=((hourly_rate[i]/100)*2)

#adding all raised value to company_raises

company_raises.extend(hourly_rate)

#The comparison in single line

for i in range(0,len(hourly_rate)):

 For this exercise i used ternary

operator hourly_rate[i]= (hourly_rate[i]+((hourly_rate[i]/100)*5)) if (hourly_rate[i]>22 and hourly_rate[i]<24) else (hourly_rate[i]+((hourly_rate[i]/100)*4)) if (hourly_rate[i]>24 and hourly_rate[i]<26) else hourly_rate[i]+((hourly_rate[i]/100)*2)

8 0
1 year ago
Constantine forms the following hypothesis. Let n be any non-negative number that meets the following condition: when n is divid
notka56 [123]

Answer:

n=5

Explanation:

if n= 5

i.     n/5=5/5=1  so it divides completely the remainder is 0

ii.  97 - 6(5) = 97 - 30 = 67,   67 is a prime number.

8 0
2 years ago
When this program is compiled and executed on an x86-64 Linux system, it prints the string 0x48\n and terminates normally, even
Alexxandr [17]

Answer:

I get 0x55 and this the linking address of the main function.

use this function to see changes:

/* bar6.c */

#include <stdio.h>

char main1;

void p2()

{

printf("0x%X\n", main1);

}

Output is probably 0x0

you can use your original bar6.c with updaated foo.c

char main;

int main() // error because main is already declared

{

  p2();

   //printf("Main address is 0x%x\n",main);

  return 0;

}

Will give u an error

again

int main()

{

  char ch = main;

  p2(); //some value

  printf("Main address is 0x%x\n",main); //some 8 digit number not what printed in p2()

  printf("Char value is 0x%x\n",ch); //last two digit of previous line output

  return 0;

}

So the pain in P2() gets the linking address of the main function and it is different from address of the function main.

Now char main (uninitialized) in another compilation unit fools the compiler by memory-mapping a function pointer on a char directly, without any conversion: that's undefined behavior. Try char main=12; you'll get a multiply defined symbol main...

Explanation:

5 0
1 year ago
Which of the following is a job that does not lend itself to telecommuting?
jonny [76]

Answer:

a car salesman who demonstrates the features of a new model of car

Explanation:

Telecommuting can be defined as the process or making use of a telephone, email, or the internet to achieve your daily work. An attorney that spends most of her time researching on the computer is making use of an internet to do her work and hence telecommuting is employed. A copywriter for an advertising firm also makes use of email in the process of write copying and hence telecommuting is employed. A telemarketer uses the telephone and a product support who handles queries sent by customers also uses the internet and emails and telephones and hence they all use telecommuting. Demonstrating the feature of a new car does not use require the use of a telephone, email, or the internet.

8 0
1 year ago
Other questions:
  • Karen just finished typing an important memo that she needs to send to many people, including the president of the company. Kare
    15·2 answers
  • The final step of the DHCP Discovery process is known as...
    8·1 answer
  • There are many different types of hardware devices, different manufacturers, and countless configuration possibilities. Explain
    14·1 answer
  • Which Internet of Things (IoT) challenge involves the difficulty of developing and implementing protocols that allow devices to
    11·1 answer
  • Choose the attribute used to provide accessibility by configuring a text alternative that is available to browsers and other use
    14·1 answer
  • ___________is used for drawing 3D objects in the field of Science and Engineering.
    12·2 answers
  • Select the correct navigational path to freeze the top row of your worksheet. Select the panes you wish to freeze. Click the tab
    15·2 answers
  • They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
    8·1 answer
  • Identify a data type applied in an input element to create slider controls.
    13·1 answer
  • What is the value of the variable result after these lines of code are executed?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!