Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

only one shop in this island, this shop is open on all days of the week except for Sunday. Consider following constraints: 1. N -

image text in transcribed

image text in transcribed

image text in transcribed

only one shop in this island, this shop is open on all days of the week except for Sunday. Consider following constraints: 1. N - Maximum unit of food you can buy each day. 2. S - Number of days you are required to survive. 3. M - Unit of food required each day to survive. 2. S - Number of days you are required to survive. 3. M - Unit of food required each day to survive. Currently, it's Monday, and you need to survive for the next S days. If it is not possible to survive on the island, then the output should simply be "No". If it is possible to survive, then the output should be "Yes" followed by the minimum number of days on which you need to buy food to survive the next S days in next line. Coding Window def survival(S, N, M): \#write your code here s = int(input ()) n=int( input ()) m=int(input()) survival (s,n,m)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

More Books

Students also viewed these Databases questions