Python Forum
How to solve this task?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to solve this task?
#1
Imagine yourself as a space ranger. Create a function that has the distances from Earth to the five nearest
stars (find the distances and names of the stars on the Internet).The user enters the speed of his ship and receives time (in hours) in which it will reach each star.If it will take more than 10 years to travel, display on the screen the recommendation to work on the ship and the speed which is needed for the voyage to last less than 10 years.
import time
alphaCentauri = 4
alphaCentauriB = 4.5
barnard = 5
lumanSixteen = 6
wolfThree = 13
speed= int(input("скорость корабля:"))
time = alphaCentauri / speed  #other stars
print("время в часах:", time,"час(ов)" )
This is all that i could write
Reply


Messages In This Thread
How to solve this task? - by DERO - Dec-06-2021, 04:33 PM
RE: How to solve this task? - by Gribouillis - Dec-06-2021, 06:32 PM
RE: How to solve this task? - by BashBedlam - Dec-06-2021, 07:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Stuck with using lists to solve task gery576 9 1,037 Jan-16-2024, 06:29 PM
Last Post: DPaul
  I need help to solve this task using while statement rico4pepe 6 9,369 Apr-02-2020, 11:34 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

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