Question: I need assistance!! im using Python and I was able to create the requested for loop structure for my assignment, but I ' m having

I need assistance!! im using Python and I was able to create the requested for loop structure for my assignment, but I'm having some trouble with creating a recursive structure. Any guideance would be great!
Develop two algorithms, one based on a for loop structure and the other on a recursive structure, to print the daily salary of a worker who each day is paid twice the previous day's dalary(starting from a penny for the first day's work) for a 30-day period.
num_of_days = int(input("Enter number of days worked: "))
total_sal =0.0
salary =0.01
print("Day Pay")
for i in range (0, num_of_days):
if(num_of_days =30):
salary =2** i
salary = salary /100
total_sal += salary
print("{} ${}".format(i +1, salary))
print("
Total Salary for", num_of_days, "days is: ${:.2f}".format(total_sal))
I need assistance!! im using Python and I was

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!