-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1_final.py
39 lines (39 loc) · 1.43 KB
/
1_final.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
#This is your first Python Subscription
# After each step save your script as "1.py" and run it in a virtual environment
# 1. Write code to print your name to the screen
# 2. Make a variable with your full name and print the variable
# 3. Make another variable with called "age" with your age and print it
# 4. Make another varialbe with called "Age" with your age and print it
# 5. Make another variable that has your age * 17 and print the result
# 6. Print to the screen "XX is a string" using a variable for "XX"
# 6. Use the type function print to the screen "age", "Age" and "Name"
# 7. Print the output of dir() of the name string
# 8. Print a blank line
# 9. Print the output of dir() of age integer
# 10. Create a variable called "info" that can contain 4 different pieces of data
# - Then use the info variable and function to print "a b c d"
# 11. Print the info variable with "1 2 3 4"
# 12. Make 2 new variables your height and weight
# - Then print with info your name, age, height and weight
# Good Luck
print ("Jed Demeule")
name = "Jed Demeule"
print (name)
age = 50
Age = "50"
print (Age)
print (age)
print (age * 17)
print (Age + " " + "a string")
print (type(name))
print (type(age))
print (type(Age))
print (dir(name))
print ()
print (dir(age))
info = "{} {} {} {}"
print (info.format("a","b","c","d"))
print (info.format(1,2,3,4))
height = ("Height=6ft")
weight = ("Weight=I am not saying")
print (info.format(name, age, height, weight))