-1

Need help figuring out where to start after I import my two previous question files. Everything I've tried doesn't seem to want to take. So I scrapped it and trying to figure out where to begin again


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 -

month = input() day = int(input())

if month in ('December', 'January', 'February'): season = 'winter' elif month in ('April', 'March ', 'May'): season = 'spring' elif month in ('June', 'July', 'August'): season = 'summer' else: season = 'fall'

if (month == 'March') and (day >= 20) or (month == 'April') or (month == 'June') and (day >= 20): season = 'spring' elif (month == 'June') and (day <= 21) or (month == 'July') or (month == 'August') or (month == 'September') and (day >= 21): season = 'summer' elif (month == 'September') and (day >= 22) or (month == 'October') or (month == 'November') or (month == 'December') and (day >= 20): season = 'fall' elif (month == 'December') and (day <= 21) or (month == 'January') or (month == 'February') or (month == 'March') and (day >= 19): season = 'winter'

print(season)


Question_2 file code I have -

amount = input()

if amount <= 0:

 print(" No Change ")

else:

 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")

1 Answers1

1

#SSince it decided to show weirdly above sharing the files below. This is question_2 ...

amount = input()

if amount <= 0:

 print(" No Change ")

else:

 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")