Answer:
trading as a whole
Explanation:
pls give brainlest almost lvled up.
Answer:
- def ending_time(hour, minutes, seconds, work_time):
- if((seconds + work_time) // 60 > 0):
- minutes = minutes + (seconds + work_time) // 60
- seconds = (seconds + work_time) % 60
-
- if(minutes // 60 > 0):
- hour = hour + (minutes // 60)
- minutes = minutes % 60
- else:
- seconds = seconds + work_time
-
- return str(hour) + ":" + str(minutes) + ":" + str(seconds)
-
- print(ending_time(2,30,59, 12000))
Explanation:
The solution code is written in Python 3.
Firstly create a function ending_time that takes the four required input parameters.
Next, create an if statement to check if the numerator of (seconds + work_times) divided by 60 is over zero. If so, increment the minute and reassign the remainder of the seconds to the variable (Line 2-4).
Next, create another if statement again to check if the numerator of (current minutes) divided by 60 is over zero, if so increment the hour and reassign the remainder of the minutes to the variable (Line 6-8)
Otherwise, just simply add the work_time to the current seconds
At last return the time output string (Line 12).
D. mouse that is your answer <span />
Answer:
The function in python is as follows
def is_present(num,list):
stat = False
if num in list:
stat = True
return bool(stat)
Explanation:
This defines the function
def is_present(num,list):
This initializes a boolean variable to false
stat = False
If the integer number is present in the list
if num in list:
This boolean variable is updated to true
stat = True
This returns true or false
return bool(stat)
Answer:
Replace
if userAge > 20
with
userAge > 19
Explanation:
if userAge > 20 checks if age is 21, 22, 23, 24........
The else condition which prints "I am a teenager" checks if age is 20, 19, 18....
Notice that 20 is inclusive of the else condition; this shouldn't be because for userAge to be less than 20, 20 isn't inclusive
To solve this,
Replace if userAge > 20 with userAge > 19
So that, the else
The else condition which prints "I am a teenager" checks if age is 19, 18, 17, 16....