在导入我之前的两个问题文件之后,需要帮助找出从哪里开始。我试过的每一件事似乎都不想接受。所以我放弃了,想办法重新开始
1. In a file called FirstName_LastName_Main.py import Question_1.py and Question_2.py modules.
2. Prompt and read in the month followed by the day from the user. Note: month is of type String and day is of type int.
3. Call Seasons function from Question_1 module with the user’s input as arguments and print the season returned by the call to the function.
4. Prompt and read the total change amount from the user. Note: the total change is an integer.
5. Call the Exact_Change function from Question_2 module with the user’s input as it’s argument.
Sample Output:
Ex. If the input is:
Enter the month: April
Enter the day: 30
Output:
April 30: Spring
Ex. If the input is:
Enter the exact change in cents: 123
Output:
1 Dollar
2 Dimes
3 Pennies
question_1 file code I have -月=输入()天=int(输入())
如果月份(‘12月',’一月‘,’二月‘):季节=’冬天‘伊莱夫月(’四月‘,’三月‘,’五月‘):季节=’春天‘埃利夫月(’六月‘,’七月‘,’八月‘):季节=’夏天‘:季节=’秋天‘
如果(月==‘>= 20)或(月==’4月‘)或(月==’6月‘)和(日>= 20):季节= 'spring’elif (月==‘==’)和( <= 21)或(月==‘7月’)或(月==‘8月’)或(月==‘9月’)和(月>= 21):季节=‘夏季’elif (月== )和(日期>= 22)或(月==‘10’)或(月==‘11月)。')或( ==‘12月’)和(第20天>= 20):季节= 'fall‘elif (月==’12‘)和(第21天<= 21)或(月==’1月‘)或(月==’二月‘)或(月==’3‘)和(第19天>= 19):季节=’冬天‘
印刷(季节)
Question_2 file code I have -金额=输入()
如果金额<= 0:
print(" No Change ")否则:
dollar = int(amount / 100)
amount = amount % 100
quarter = int(amount / 25)
amount = amount % 25
dime = int(amount / 10)
amount = amount % 10
nickel = int(amount / 5)
penny = amount % 5
if dollar >= 1:
if dollar == 1:
print(str(dollar)+" Dollar")
else:
print(str(dollar)+" Dollars")
if quarter >= 1:
if quarter == 1:
print(str(quarter)+" Quarter")
else:
print(str(quarter)+" Quarters")
if dime >= 1:
if dime == 1:
print(str(dime)+" Dime")
else:
print(str(dime)+" Dimes")
if penny >= 1:
if penny == 1:
print(str(penny)+" Penny")
else:
print(str(penny)+" Pennies")
if nickel >= 1:
if nickel == 1:
print(str(nickel)+" Nickel")
else:
print(str(nickel)+" Nickels")发布于 2022-11-10 03:22:58
#因为它决定在上面显示奇怪的东西,分享下面的文件。这是question_2 ..。
金额=输入()
如果金额<= 0:
print(" No Change ")否则:
dollar = int(amount / 100)
amount = amount % 100
quarter = int(amount / 25)
amount = amount % 25
dime = int(amount / 10)
amount = amount % 10
nickel = int(amount / 5)
penny = amount % 5
if dollar >= 1:
if dollar == 1:
print(str(dollar)+" Dollar")
else:
print(str(dollar)+" Dollars")
if quarter >= 1:
if quarter == 1:
print(str(quarter)+" Quarter")
else:
print(str(quarter)+" Quarters")
if dime >= 1:
if dime == 1:
print(str(dime)+" Dime")
else:
print(str(dime)+" Dimes")
if penny >= 1:
if penny == 1:
print(str(penny)+" Penny")
else:
print(str(penny)+" Pennies")
if nickel >= 1:
if nickel == 1:
print(str(nickel)+" Nickel")
else:
print(str(nickel)+" Nickels")https://stackoverflow.com/questions/74383781
复制相似问题