TORONTO KIDS COMPUTER CLUB | PMCA Sunday 14:00 Python Homework 20.09.27.
18397
post-template-default,single,single-post,postid-18397,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

PMCA Sunday 14:00 Python Homework 20.09.27.

01 Oct PMCA Sunday 14:00 Python Homework 20.09.27.

Question:

You’re on a long car trip and arrive at a gas station. It’s 200 km to the next station. Write a program to figure out if you need to buy gas here, or if you can wait for the next station.

Input Specification:
The program should ask the question, and waiting for your input:

How many km your car can go?

Output Specification:
should look something like this:

The next gas station is 200 km away
You can wait for the next station or You have buy gas here


Input Sample 1:
How many km your car can go? 240

Output Sample 1:
The next gas station is 200 km away
You can wait for the next station.


Input Sample 2:
How many km your car can go? 120

Output Sample 2:
The next gas station is 200 km away
You have buy gas here

No Comments

Sorry, the comment form is closed at this time.