Computer Science, asked by CaptainArmaan, 10 months ago

please answer question 6 7 8 9​

Attachments:

Answers

Answered by fiercespartan
4

These codes are pretty self explanatory:

_____________________________________

QUESTION 6:

days = int(input('Enter the number of days:'))

years = days//365

months = (days - (365*years))//30

weeks = (days - ((365*years)+(months*30)))//7

Remain = (days - ((365*years)+(months*30) + (7*weeks)))//7

print(f'Years:{years}\nMonths:{months}\nWeeks:{weeks}\nRemaining days:{Remain}')

______________________________________

QUESTION 7:

set = []

for _ in range(2):

   hm = list(map(int,input('Enter number of hour and minutes separated by a         comma').split(',')))

   print('The total number of minutes = {(hm[0]*60)+hm[1]}')

   print('The total number of hours = {hm[1] + (hm[0]/60)}')

_______________________________________

QUESTION 8:

num = int(input('Enter a number:'))

for i in range(11):

   print(f'{num}*{i} = {num*i}')

_______________________________________

QUESTION 9:

limit = int(input('Enter the limit:'))

for i in range(0,limit):

   if i%2 != 0:

       print(i**3)

______________________________________

Similar questions