You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5.5 KiB
5.5 KiB
In [117]:
import random a = ('chips','foil','tin','stone','paperbox') b = ('in a forest','in pzi','at leslie-s','in liverpool') c = ('a yellow submarine','a led torch','a fire torch') d = ('tintin','dustman','david bowie','donald') for x in range(5): ma = random.randint(0,len(a)-1) mb = random.randint(0,len(b)-1) mc = random.randint(0,len(c)-1) md = random.randint(0,len(d)-1) print(f"""A house of {a[ma]} {b[mb]} Using {c[mc]} Inhabited by {d[md]}.""")
A house of tin at leslie-s Using a fire torch Inhabited by donald. A house of paperbox in pzi Using a led torch Inhabited by donald. A house of paperbox in a forest Using a yellow submarine Inhabited by donald. A house of paperbox in pzi Using a yellow submarine Inhabited by donald. A house of stone in liverpool Using a fire torch Inhabited by donald.
In [120]:
a = ('chips','foil','tin','stone','paperbox') b = ('in a forest','in pzi','at leslie-s','in liverpool') c = ('a yellow submarine','a led torch','a fire torch') d = ('tintin','dustman','david bowie','donald')
In [120]:
for x in range(5): ma = random.choice(a) mb = random.choice(b) mc = random.choice(c) md = random.choice(d) print(f"""A house of {ma} {mb} Using {mc} Inhabited by {md}.""")
In [120]:
A house of chips at leslie-s Using a yellow submarine Inhabited by donald. A house of tin in a forest Using a fire torch Inhabited by tintin. A house of tin in a forest Using a yellow submarine Inhabited by david bowie. A house of tin in a forest Using a led torch Inhabited by donald. A house of chips in pzi Using a led torch Inhabited by tintin.
In [123]:
A house of stone at leslie-s Using a fire torch Inhabited by donald. A house of foil in liverpool Using a fire torch Inhabited by donald. A house of chips in pzi Using a yellow submarine Inhabited by david bowie. A house of stone at leslie-s Using a yellow submarine Inhabited by david bowie. A house of chips in liverpool Using a yellow submarine Inhabited by dustman.
In [144]:
ah ok vediamo ciccio
In [ ]: