Last answered:

09 Dec 2022

Posted on:

08 Dec 2022

1

Don't know why Giles making Question 3 solution harder

I'm attaching my solution for Question 3


user_in = int(input("Please Enter a number between 1 to 12 :"))
print(f'==================================\n Solution for {user_in} is ')
n = 1
while 12 > user_in > 1 and n <= 12:
    print(f'{user_in} * {n} = ',user_in * n)
    n += 1
1 answers ( 0 marked as helpful)
Posted on:

09 Dec 2022

1

To perform task in Question 1 with indexing logic is followed:

word = input('Please enter a name of any fruit you like > ')
reverse_string = ' '
for char in range(0, len(word)):
        reverse_string  += word[-1-char]

print(f' {reverse_string}')

This also provide the desired output.
if there is any correction, or suggestions from instructor or any learner then it is helpful for me.

Submit an answer