Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with code
#2
Is the below what you are after? Run the script and let me know!

This isn't hard stuff really, you should try and learn it because it's really useful, they wouldn't set you stuff like this if it wasn't important to your learning.

n = int(input('Enter number of songs: '))  # Quantity of Songs

songs = []

for i in range(1, n + 1):
    t = int(input('Enter song length: '))  # Song time in seconds
    print(f"Song {i} ->", "Minutes:", t // 60, "Seconds:", t % 60)
Reply


Messages In This Thread
Need help with code - by Devaraja - Jan-21-2021, 10:04 AM
RE: Need help with code - by Aspire2Inspire - Jan-21-2021, 12:43 PM
RE: Need help with code - by Devaraja - Jan-21-2021, 01:12 PM
RE: Need help with code - by DPaul - Jan-21-2021, 02:32 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020