• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

Engineering 102 Exams 1 & 2 - TAMU - Ijaz

Document preview thumbnail
Preview 2 out of 10 pages

Engineering 102 Exams 1 & 2 - TAMU - Ijaz Engineering 102 Exams 1 & 2 - TAMU - Ijaz Engineering 102 Exams 1 & 2 - TAMU - Ijaz Engineering 102 Exams 1 & 2 - TAMU - Ijaz

Content preview

Engineering 102 Exams 1 & 2 - TAMU -
Ijaz
Engineering 102 Exams 1 & 2 - TAMU -
Ijaz
Turn mystr = "string1 string2 string3" into a list - ANSWER mystr = mystr.split(" ")



Turn mystr = "1234" into a list - ANSWER mystr = list(mystr)



bool("any string") - ANSWER True



format the float var to have x decimal places and print it - ANSWER print('{:.xf}'.format(var))



loop the dictionary my_dict - ANSWER for key, value in my_dict.items():



How to input two variable at a time (x and y) - ANSWER x, y = input("...").split()



loop through the values in my_dict - ANSWER for value in my_dict.values():



loop through the keys in my_dict - ANSWER for key in my_dict.keys():



string.ljust(x) will... - ANSWER add x-len(string) amount of spaces to the right the string



string.rjust(x) will... - ANSWER add x-len(string) amount of spaces to the left the string



\b - ANSWER will delete the last character of the string



\t - ANSWER will print it tabbed

, Engineering 102 Exams 1 & 2 - TAMU -
Ijaz
use the find function find the index of x in mystr - ANSWER mystr.find(x)



import math module - ANSWER from math import *



import pi - ANSWER math.pi



define a function called myfun - ANSWER def myfun():



call a funtion called myfun - ANSWER myfun()



put ==, and, or, & not in order of operations - ANSWER ==, not, and, or



bool() - ANSWER False



bool(0) - ANSWER False



bool(1) - ANSWER True



2 things that will make the code stop running - ANSWER exit() and quit()



True or False: you can add lists like

newList = smallList1 + smallList2 - ANSWER True



adds something to the end of a list (list) - ANSWER list.append()



in a list, what will insert x to make it index i - ANSWER list.insert(i, x)

Document information

Uploaded on
July 16, 2025
Number of pages
10
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$8.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
BestTutor001
3.0
(3)
Sold
29
Followers
9
Items
2614
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions