When the below portion of the script is activated, it shows all the commas and single quotes (and parentheses) in the results.
print(name, 'has been alive for', days, 'days', minutes, 'minutes and', seconds, 'seconds!')
So, for instance:
('Ryan', 'has been alive for', 10220, 'days', 14726544, 'minutes and', 883593928, seconds!')
I want to clean it up, so it looks good. Is that possible?
By "good", I mean something like this:
Ryan has been alive for 10220 days, 14726544 minutes, and 883593928 seconds!
Here is the full script:
print("Let's see how long you have lived in days, minutes, and seconds!")
name = raw_input("name: ")
print("now enter your age")
age = int(input("age: "))
days = age * 365
minutes = age * 525948
seconds = age * 31556926
print(name, 'has been alive for', days, 'days', minutes, 'minutes and', seconds, 'seconds!')
raw_input("Hit 'Enter' to exit!: ")
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…