CodeSolved

Solved Programming Questions & Exercises

Distance traveled by light

Practice Easy 1288/ Download 495 Views

Write a program that receives time in seconds and determines that the light in that period of time can take a few meters

Consider the speed of light 300,000,000 m / s

20 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
y = int(input("zaman ra bar hasb sanie vared konid: "))
x = y * 300000000
print('masaafati ke noor dar modat zaman  khaste shode tey mikonad barabar ast ba:  ',x,'metr')
Aref.2 Download Python
TM = int(input("Enter time (in seconds): "))
print(TM*300000000,"m")
Amirali Download Python
while True:
    try:
        time = int(input('time in seconds: '))
        print(f'light goes {time * 300000000} meters in {time} seconds')
        break
    except:
        print('enter a number')
while True:
    soratenor = int(input('enter the time in second : '))
    print('soratenor is : ' , soratenor* 300,000,000)
    if soratenor is not int:
        l = input('if you want to leave enter the *leave* word : ')
    if l == 'leave':
        break
    else:
        continue
Zahra1392 Download Python
# secend = int(input('secend: '))
i = 0
while secend > i:
    print(i * 3000000000)
    i += 1
Nima1393 Download Python
<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

×
×
Close