Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
flight_height = int(input('Enter the height of the flight: ')) km_to_travle = int(input('Enter the KM to travle: ')) wind_cond = input('Wind Condition (H/C/T) : ') wind_cond = wind_cond.lower() fuel_percent = 0 if wind_cond == 'h': fuel_percent = 0.05 elif wind_cond == 'c': fuel_percent = 0.02 else: fuel_percent = -0.04 if flight_height < 10000 or flight_height > 35000: print('NO Fly Zone') else: fuel_comp = 0 #t = s/v total_min = km_to_travle / (1000/100) # distance / velocity total_min += total_min * fuel_percent # time + (time * fuel_percent) # n = q.60+r time_hour = total_min//60 # r = n - (q*60) time_min = total_min - (time_hour*60) if flight_height > 25000: fuel_comp = km_to_travle * (1000/1000) fuel_comp += fuel_comp * fuel_percent elif flight_height > 20000: fuel_comp = km_to_travle * (1500/1000) fuel_comp += fuel_comp * fuel_percent else: fuel_comp = km_to_travle * (2000/1000) fuel_comp += fuel_comp * fuel_percent print(f"AirPlane should carry {fuel_comp} liters of fuel.") print(f"Flight will be {int(time_hour)} hours and {int(time_min)} minutes long.")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)