Q:

How do I print multiple variables in a line of code?

!/usr/bin/env python3

import random
import socket
import time
import sys
import os

print ('Ping Of Death')
os.system("clear")
print

ip_death = input("ip:")
packetsize = input("size:")
print (ip_death)

os.system("ping ip_death, -s packetsize ")

and the output I get is
ping: ip_death,: Name or service not known

I know the variables are defined because of print (ip_death) that I have tested and always comes out with my input.
I'm new to python and just wondering how I can run both of these variables in the in one command. If wonder I'm trying to run Ping example.com -s "size of packet".

A:

You need to format the string:
os.system("ping {}, -s {}".format(ip_death, packet_size))

You can also verify you're doing the right thing by printing the command before executing it:
command = "ping {}, -s {}".format(ip_death, packet_size)
print(command) # see that its what you wanted to execute
os.system(command)

Currently you just baked the names into the strings. Python doesn't automagically know what it should format and what it shouldn't.
Also - black hat hacking is bad <3

