66weight = input ()
77
88print (f"So, you're { age } old, { height } tall and { weight } heavy." )
9+
10+ # study drills
11+
12+ #!/usr/bin/env python3
13+
14+ # ex11: Asking Questions
15+
16+ # raw_input() was renamed to input() in Python v3.x,
17+ # and the old input() is gone, but you can emulate it with eval(input())
18+
19+ print ("How old are you?" , end = " " )
20+ age = input ()
21+ print ("How tall are you?" , end = " " )
22+ height = input ()
23+ print ("How much do you weight" , end = " " )
24+ weight = input ()
25+
26+ print ("So, you're %r old, %r tall and %r heavy." % (age , height , weight ))
27+
28+ print ("Enter a integer: " , end = " " )
29+ num = int (eval (input ())) # won't work with int(raw_input)), with eval(input()) it would work
30+ print ("The number you've input is: %d" % num )
31+ print ("Enter a name: " , end = " " )
32+ name = input ()
33+ print ("What's %s's age?" % name , end = " " )
34+ age = eval (input ())
35+ print ("What's %s's height?" % name , end = " " )
36+ height = eval (input ())
37+ print ("What's %s's weight?" % name , end = " " )
38+ weight = eval (input ())
39+ print ("What's the color of %s's eyes?" % name , end = " " )
40+ eyes = input ()
41+ print ("What's the color of %s's teeth?" % name , end = " " )
42+ teeth = input ()
43+ print ("What's the color of %s's hair?" % name , end = " " )
44+ hair = input ()
45+
46+ type (name ) # the data type of name will be <class 'str'>
47+ type (age ) # the data type of age will be <class 'int'>
48+
49+ print ("Let's talk about %s" % name )
50+ print ("He's %d years old." % age )
51+ print ("He's %d inches tall." % height )
52+ print ("He's %d pounds heavy." % weight )
53+ print ("Actually that's not too heavy" )
54+ print ("He's got %s eyes and %s hair." % (eyes , hair ))
55+ print ("His teeth are usually %s depending on the coffee." % (teeth ))
56+
57+ print ('If I add %d, %d and %d I get %d.' % (age , height , weight , age + height + weight ))
0 commit comments