forked from jstrickler/20230306JPMC-AM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoutput_to_screen.py
52 lines (30 loc) · 859 Bytes
/
output_to_screen.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
cave_man = "Fred Flintstone"
city = "Bedrock"
value = 89.38032
print(cave_man, city, value)
# str(cave_man) + " " + str(city) + " " + str(value) + "\n"
print("cave man:", cave_man)
print(cave_man, city, sep=',')
print(cave_man, city, sep='#')
print(cave_man, city, sep='')
print(cave_man, city, sep='\n')
print("first part", end=" ")
# if ...
print("more", end=" ")
# if ...
print("more", end=" ")
print("end")
print(cave_man, city, sep=',')
print()
x = cave_man + ',' + city + ',' + str(value)
print(x)
s = f"{cave_man},{city},{value}"
print(s)
print(f"{cave_man} lives in {city}")
print(f"{cave_man} lives in {city} VALUE: {value}")
print(f"{cave_man} lives in {city} VALUE: {value:.1f}")
print(f"2 + 2 = {2 + 2}")
# f"" only >= version 3.6
print("{} lives in {} VALUE: {:.1f}".format(cave_man, city, value))
x = 57
print(f"x: {x}")