try this
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/button1"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:text="Button" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<Button
android:id="@+id/button3"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="0.4"
android:text="Button" />
<Button
android:id="@+id/button4"
android:layout_width="0px"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:text="Button" />
</LinearLayout>
</LinearLayout>

so for solving this problem you must use android:layout_weight="40/100"="0.4"
and before it you must set android:layout_width
to 0 .becuase without it android:layout_weight="40/100"="0.4"
dont work.
for more details aboute ``android:layout_weight` go
What does android:layout_weight mean?
UPDATE 1
for doing this task for height of button try below code
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="0.6"
android:orientation="horizontal" >
<Button
android:id="@+id/button1"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_weight="0.4"
android:text="Button" />
<Button
android:id="@+id/button2"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_weight="0.6"
android:text="Button" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_weight="0.4"
android:orientation="horizontal" >
<Button
android:id="@+id/button3"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_weight="0.4"
android:text="Button" />
<Button
android:id="@+id/button4"
android:layout_width="0px"
android:layout_height="fill_parent"
android:layout_weight="0.6"
android:text="Button" />
</LinearLayout>
</LinearLayout>