|
#! /usr/bin/env python
|
| import sys |
| from stat import * |
#!/bin/bash
| |
| |
# This script prints a message about your weight if you give it your
| |
# weight in kilos and height in centimeters.
| |
| |
weight="$1"
| |
| # This script prints a message about your weight if you give it your |
|
# weight in kilos and height in centimeters. |
|
weight=str(sys.argv[1]) |
height="$2"
| |
| height=str(sys.argv[2]) |
idealweight=$[$height - 110]
| |
| idealweight=[height - 110] |
| |
if [ $weight -le $idealweight ] ; then
echo "You should eat a bit more fat."
else
echo "You should eat a bit more fruit."
fi
| |
| if (weight <= idealweight ):
print("You should eat a bit more fat.")
else:
print("You should eat a bit more fruit.") |
ÿ | |