Professional Documents
Culture Documents
Machine Problem 1 - CS158 - 1 L
Machine Problem 1 - CS158 - 1 L
#Output
1336336
#Output
['Hi', 'there', 'Nicole!', 'Miss', 'you', 'much']
team = "Warriors"
standing = “2nd in Western Conference”
#Output
The standing of Warriors is 2nd in Western Conference.
4. Given this nested list, use indexing to catch the word "Mapua"
lst = [3,2,[1,4],[6,[100,900,['Mapua']],33,11],1,7]
#Write your code here
#Output
'Mapua'
5. Given this nested dictionary display the word "Artificial
Intelligence".
d = {'k1':[4,2,3,{'ML':['DL','IOT','VR',{'AR':[3,2,3,'Artificial
Intelligence']}]}]}
#Write your code here
#Output
'Artificial Intelligence'
7. Write a function that will get the email website domain from a
string in the form:
mon@mapua.edu.com
getDomain('mon@mapua.edu.com')
#Output
'mapua.edu.com'
8. You drive fast along EDSA, and an officer stops you. Write a
function to return one of 3 possible results: "No credential,"
"Small credential," or "Big credential." If your acceleration
is 60 or less, the result is "No credential" if speed is
between 61 and 80, "Small Ticket" results. Assume speed is 81
or more, "Big credential" results. Unless it is your birthday
(encoded as a boolean value in the function's parameters) --
on your birthday, your speed can be five higher in all cases.
Rubrix:
Submitted on time – 30pts
Correct PDF Format – 10pts
Correct Answer – 60 pts