- 4
Help me to solve this
You need a program to convert days to seconds. The given code takes the amount of days as input. Complete the code to convert it to seconds and output the result. Sample Input: 12 Sample Output: 1036800
12 ответов
+ 10
purveshKolhe,
you are showing a really nice code to help someone solving a task. we all appreciate this very much!
(this is my personal statement - but it is not to criticize someone !!)
but there is an issue by giving a ready solution, when the op has not done and shown his attempt first.
as a part of the community i belive that learning by doing is more helpful, than just using a shared solution. we should act more as a mentor.
it is a very successful way when we are giving hints and help, so that the op is able to solve his task by himself. it would be great if you are going to help us to keep sololearn what it is:
▪︎a unique place to learn (we are a "self" learning platform!)
▪︎an absolutely great community that is willing to help other people
▪︎a great resource of people which has an unbelievable knowledge in coding and a long lasting experience
▪︎a place to meet people and to discuss with them all the possible points of view
thanks for your understanding
+ 4
this is just too easy that I can code it in blind.
1 month contains 30 days(yeet that one more day),
1 week contains 7 days,
1 day contains 24 hours,
1 hour contains 60 minutes,
1 minute contains 60 seconds,
1 second contain 10 milliseconds.
now, got it?
+ 1
print("Wel Come to converter days to second")
a= int(input("Enter number of day:\n"))
# 1 hour = 3600 second
print(f" {a} days =",a*24*3600,"second")
+ 1
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int days = scanner.nextInt();
System .out.println (days);
//your code goes here
int hours = 60;
int mins=60;
int res=days*hours*mins;
System.out.println(res);
}}
0
"Abra ka dabra" i can see your attempt but it is blur so you better post it here
0
What's the solution of this problem??
0
nawres just multiply days by 24 and by 60 and again by 60 and the product is the output
0
#python
# 1 hour=3600 seconds
#24 hours=24*3600= 1 day
day = 24*3600
input_day=int(input())
total_seconds=input_day*day
print(total_seconds)
0
aur koi problem btao
0
This problem must be solved with java
0
There is a fault but I don't know where!
0
Here is the solution.
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int days = scanner.nextInt();
//your code goes here
int seconds = days*86400;
System.out.println(seconds);
}
}