Guest User

Tarea 1 _ Mariana Luna

a guest
Aug 25th, 2019
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ex={}
  2. ex={"Students":{}}
  3. students = {"Cristian","Mariana","Pablo","Constantino","Andres","Enrique","Majo","Douglas","Diego","Luis","Eduardo","Oscar","Adriana"}
  4.  
  5. for x in students:
  6. ex["Students"][x] = {"Location":"MX", "Classes":["Pipeline", "Rendering"]}
  7.  
  8. for x in ex["Students"].keys():
  9. if x[0] == "C" or x[0] == "E":
  10. ex["Students"][x]["Classes"].append("VFX Programming")
  11. if x[0] == "M" or x[0] == "D":
  12. ex["Students"][x]["Classes"].append("Concept Art")
  13. if x[0] == "A" or x[0] == "P":
  14. ex["Students"][x]["Classes"].append("Social Responsivility")
  15.  
  16. print ex
  17.  
  18. teachers = {"Omar","Daniel","Julian","Hasiel","Fernando"}
  19.  
  20. for y in teachers:
  21. print "%s\n%s%s\n%s%20s%20s\n%s" % ("-" * 50,"Teacher: ",y, "Student: ", "Location: ", "Class: ", "-" * 50)
  22. for num, name in enumerate(ex["Students"].keys()):
  23. getLocation = ex["Students"][name]["Location"]
  24. if y == "Omar":
  25. for clas in ex["Students"][name]["Classes"]:
  26. if clas == "VFX Programming":
  27. print "%s.%10s%15s%30s\n" % (num+1, name,getLocation, clas)
  28. if y == "Daniel":
  29. for clas in ex["Students"][name]["Classes"]:
  30. if clas == "Rendering":
  31. print "%s.%10s%15s%30s\n" % (num+1, name,getLocation, clas)
  32. if y == "Julian":
  33. for clas in ex["Students"][name]["Classes"]:
  34. if clas == "Concept Art":
  35. print "%s.%10s%15s%30s\n" % (num+1, name,getLocation, clas)
  36. if y == "Hasiel":
  37. for clas in ex["Students"][name]["Classes"]:
  38. if clas == "Pipeline":
  39. print "%s.%10s%15s%30s\n" % (num+1, name,getLocation, clas)
  40. if y == "Fernando":
  41. for clas in ex["Students"][name]["Classes"]:
  42. if clas == "Social Responsivility":
  43. print "%s.%10s%15s%30s\n" % (num+1, name,getLocation, clas)
  44. print "\n"
RAW Paste Data