PLEASE HELP ME WITH THIS PYTHON CODE::::: THANKS!!!



Lists are an example of a data abstraction.


A data abstraction can often contain different types of elements. It also provides a separation between the abstract properties of a data type (integer, boolean, string) and the concrete details of its representation. Basically, it doesn’t matter that the type are different!


Create an empty list. Append the integer 3, a string of "hello" and a boolean of False into the list. Print out each index individually. Now, remove the number 3 and False from the list.


Finally, print out the list again.

Answers

Answer 1

Answer:

Explanation:

The following Python code does exactly as requested. Once the list is created and the elements are added to it, it uses a for loop to print out each element individually. Then once the loop is over it removes the 3 and False elements from the list and creates another for loop to print the remaining element(s) individually again.

my_list = []

my_list.append(3)

my_list.append("hello")

my_list.append(False)

for x in my_list:

   print(x)

my_list.remove(3)

my_list.remove(False)

for x in my_list:

   print(x)


Related Questions

A mathematical process of coding information so that only the intend user can read it

Answers

Answer:

asymmetric encryption with the intended user's public key.

Explanation:

Only that user will be able to decrypt the information.

Match the OOP concept to its definition.
encapsulation
data abstraction
inheritance
derived class
defines a class in terms of another class
arrowRight
inherits the properties of a base class
arrowRight
provides only essential information to the world
arrowRight
binds data and functions together
arrowRight

Answers

Answer:

defines a class in terms of another class = inheritance

inherits the properties of a base class = derived class

provides only essential information to the world = data abstraction

binds data and functions together = encapsulation

Explanation:

Design a software system for a bookstore that keeps an inventory of two types of books: Traditional books and books on CD. Books on CD may also contain music. The bookstore purchases books from publishers and sets a price for each book. Customers can purchase books from the bookstore, using either cash or a credit. The bookstore keeps track of which books it has in its inventory, and the books purchased by each customer

a. What are the objects in your object- oriented Solution?
b. What are the interactions between objects in your solution?
c. Which objects "have" other objects?
d. Which Objects "Use" other objects?
e. Which objects are other objects?

Answers

Answer:

Explanation:

a. In this scenario, the best solution would have an Object of Traditional Books, CD, Music, Bookstore and Customer.

b. All five objects would be able to be called by the main program loop and the Customer Object would call upon and use either the Books or CD object, While the Bookstore object would call upon all of the other objects.

c. Both the Bookstore object and Customer object will "have" other objects as the Bookstore needs to hold information on every Book or CD in the Inventory. While the Customer object would call upon the Book and CD object that they are purchasing.

d. The Music Object will extend the CD object and use information on the CD object as its parent class.

e. Since the Music Object extends the CD object it is also considered a CD since it is in CD format like the Books on CD and therefore is both objects.

Why did Elena Gilbert Turn her humanity off when she was sired to Damon? (In The Vampire Diaries)

Answers

Answer:

Ok, so when her brother died she couldn't take it and was in denial for like the longest time. And since she was still sired to Damon bofre her humanity was off she could still listen to him.

Explanation:

It is for employees to make mistakes that compromise the security of an organization’s computer devices and sensitive information.

impossible
difficult
easy

Answers

Answer: Easy

Explanation: Correct on my Edg 2021.

It is simple for employees to make mistakes that jeopardize a company's computer system security and sensitive data.

What exactly is sensitive data?

Sensitive information has been defined as personal data that includes facts or opinions concerning a person's race or ethnicity. political affiliations or beliefs. beliefs in religion or philosophy. Data that needs to be shielded from unwanted access in order to protect the security or privacy of a person or organization is considered sensitive information.

Pattern-based classifiers called sensitive information types (SIT) are used. To see a complete list of all SITs, see Sensitive information types entity definitions. They look for sensitive information like social security, credit card, or bank account numbers to identify sensitive things.

Therefore, It is simple for employees to make mistakes that jeopardize a company's computer system security and sensitive data.

To know more about sensitive information visit;

brainly.com/question/26191875

#SPJ3

Swapping Order of Vowels Write a program to swap the order of the vowels in a given word. For example, if the word is programming, the output is prigrammong. Here, the initial order of vowels is o, a, i which changes to i, a, o. Assume that the letters of the words are in lowercase.

Answers

Answer:

Program is as follow:

Explanation:

#include<iostream.h>

#include < conio.h>

bool isVowel(char b)

{

return

( b=='a' || b=='A' || b=='e' || b=='E' || b=='i' || b=='I' || b=='o' || b=='O' || b== 'u' || b=='U');

For swaoing the vowels

string reverseVowel ( String str)

{

int j = 0;

string v ;

for ( int i= 0 ; str [i]]!='0'; i++)

if( isv(str[i]))

v[j++] = str[i[;

for ( int i = 0; str[i]! = '0' ; i++

if ( isv (str[i]))

str{i} = v [--j]

return str;

}

int main ()

{ string str = " Programming";

cout<<swapv(str);

return 0 ;

}

You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area& in student records processing. It seems that the program currently used to compute student grade point averages and class rankings runs terribly slow and as a result end of year reports are habitually late. Your are asked to come up with a list of items that should be checked in order to determine if a modification to code is in order. The IT department head is asking you to do this without the opportunity to actually see the current application/programs in use. What questions would you ask about the current code? What areas of code would you look at? What would you need to know about the student data?

Answers

Answer:

Explanation:

There are various questions that you can ask in this scenario, such as

What grading policies are being implemented?

How many student grades are being calculated by the program?

What is the requirements for a student to pass?

All of these questions would allow you to get an idea of how extensive the code may be and its complexity. Once you know this you would look at the code revolving around actually looping through the data and doing the necessary calculations. You can then determine how to manipulate the code and make it much more efficient.

You would also need to know how the student data is being saved, which will help determine if it is the best data structure for saving this type of data or if it can be replaced in order to maintain the data secure while increasing the speed of the program. Mainly since this information needs to be continuously used from the data structure.

Other Questions
A town plans to clear a patch of forest to make a road wider. What possible changes should the town take into account? Lonergan Company occasionally uses its accounts receivable to obtain immediate cash. At the end of June 2021, the company had accounts receivable of $920,000. Lonergan needs approximately $570,000 to capitalize on a unique investment opportunity. On July 1, 2021, a local bank offers Lonergan the following two alternatives:A. Borrow $570,000, sign a note payable, and assign the entire receivable balance as collateral. At the end of each month, a remittance will be made to the bank that equals the amount of receivables collected plus 10% interest on the unpaid balance of the note at the beginning of the period.B. Transfer $620,000 of specific receivables to the bank without recourse. The bank will charge a 3% factoring fee on the amount of receivables transferred. The bank will collect the receivables directly from customers. The sale criteria are met.Required: 1. Prepare the journal entries that would be recorded on July 1 for: a. alternative a. b. alternative b.2. Assuming that 70% of all June 30 receivables are collected during July, prepare the necessary journal entries to record the collection and the remittance to the bank for:____. a. alternative a. b. alternative b. When would a female have a 100% chance of inheriting a sex-linked recessive trait?A. She inherits an affected X chromosome, but only from her mother.B. Mother and father both pass on dominant alleles on somatic (body) chromosomes.oC. She inherits an affected X chromosome from both mother and father.D. Mother and father both pass on recessive alleles on somatic (body) chromosomes. The line plot shows the distances, in miles, run by joggers in a park.---------------------------------A number line with one x above .5, one x above 1.5, one x above 2, one x above 3, two xs above 3.5, two xs above 4, one x above 4.5, and one x above 8.5.How many runners ran at least 3 miles?Enter your answer in the box.{ } runners In 1994, Leroy Burrell of the United States set what was then a new world record for the mens 100 m run. He ran the 1.00 102 m distance in 9.5 s. Assuming that he ran with a constant speed equal to his average speed, and his kinetic energy was 3.40 103 J, what was Burrells mass? Give three examples from the text which support Muhammad Alis statement that, "I have always believed in myself." HELP ME ASAP Qu es? (Limit your response to a definite article and noun) *Your answer Hi yall can plz help me with this it would mean a lot.....Thanks! Please help me someone? Society during the middle ages was organized into a feudal system, which consisted of small communitiescongregated around a central "Lord." The owner of all of the land in a country was ultimately the king, but because the king couldneither protect nor rule all of his land himself, he divided it up into segments called "fiefs" and awarded fiefs to important nobles,typically barons or bishops, in exchange for their contributions of soldiers and/or money to the king's armies. The Lords lived in alarge house or a castle called the manor. People would gather at the manor for celebrations, or for protection, if necessary.Immediately around the manor was the village, which included the church. Farms, which supplied food to the Lord and to thevillagers, were in the outlying areas.About 90% of the people that lived under the feudal system in the middle ages were peasants, usually called "serfs." The Lordsprotected the peasants, and in return the peasants worked for the Lords. Though some peasants were free and practiced trades likecarpentry, baking, and blacksmithing, most were little more than slaves. They worked long, hard days, six days a week for not muchmore than subsistence.Women worked hard during this period too, and not only at the household tasks that you would expect them to do, like cooking,baking bread, sewing, weaving and spinning. They also hunted for food, fought in battles, and worked as blacksmiths, merchants andapothecaries, midwives, fieldworkers, writers, musicians, dancers or painters. Other women became nuns. Some women werebelieved to be witches. A famous woman from the middle ages is Joan of Arc, the daughter of a French peasant, who claimed to hearvoices instructing her to protect France against the English invasion. Dressed in armor, she led a victorious troop of soldiers againstthe English in the fifteenth century. But the Middle Ages was rife with ignorance and superstition, and even after her service to hercountry, Joan of Arc was burned as a witch.1. What was the benefit of the feudal system to the king? 1. What happens to the products of the Krebs cycle? plz help!! I need an answer ASAP (2,2) and (2,-2) slope? Help brainy please help help help How do I solve for X? The age of innocence Classify the polynomial by degree Name 2 ways wind energy is used to move objects.Name 2 ways water energy is used to move objects. someone help ,, I'll give brainliest lolll . HELP id.k the answer