Yes and No it all depends on how the author wants the poem how to be and become. Majority of the time science fiction is set for the future.
Answer:
- Print the values days of bottles.
- Display total number of bottles collecting.
- Display the payout for this transaction.
Explanation:
Program:-
DEPOSIT_PER_BOTTLE = 0.10
another = "Y"
while another=="Y":
print("Input Values 7 days of bottles:")
total = 0
for I in range(7):
collected_bottles = int(input())
total += collected_bottles
payout = total*DEPOSIT_PER_BOTTLE
print("Total number of bottles collected: {:,}".format(total))
print("Payout for this transaction $%.2f"%payout)
another = input("Do you want to complete another transaction? ").upper()
Answer:
The solution code is written in Python 3:
- calories = int(input("Enter number of calories: "))
- fats = int(input("Enter number of fat in grams: "))
-
- if(calories > 0 and fats > 0):
- cf = fats * 9
- if(cf < calories):
- percent = cf / calories
- if(percent < 0.3):
- print("Food is low in fat")
- else:
- print("Error input. Calories from fat cannot more than total calories")
- else:
- print("Error input. Calories and fats must be more than 0")
Explanation:
Firstly, use input function to ask user to enter total number of calories and fat in grams (Line 1-2)
Next we do the first input validation to check if the calories and fats are more than 0 (Line 4). If so apply formula to calculate calories from fats. If not, print error input message (Line 5, 13)
Then we proceed to next input validation to check if calories from fact more than total calories. If so, proceed to calculate percentage of calories from fats and if it is lower than 30%, display the appropriate message (Line 6 - 9). If fail the second input validation, the program will display another error input message again (Line 11)
The term homepage visitors <span>describes the users that visited your homepage, but didn't move any further into your site.
</span><span>Homepage denotes the main initial web page of a website.
</span><span>The first web page people see when they arrive on a website is also known as the "landing page".</span>