First argument is hostname and second is password.
#!/usr/bin/expect
set pass [lindex $argv 1]
set host [lindex $argv 0]
spawn ssh -t root@$host echo Hello
expect "*assword: "
send "$pass\n";
interact
Execution: ./script.expect
./script.expect hostname "my!password?"