int
, float
, str
, list
=
type()
range()
int()
, str()
, float()
input()
for
loopsprint()
def main():
for i in :print(i)print("-----")
for x in :print("x =",x)print("done!")
for ch in "hello!":print("---" + ch + "---")
$ python3 gallons.py Gallons: 2 That's 7.58 liters.
Write a program that asks the user for their name, and then prints their name 20 times.
What is the value and type for each of the following expressions? Try them in python3 to check your answers.
For example, the answer to the first one (2 + 3
) would
be: value=5, type=integer.