62 518
Assignments Done
98,7%
Successfully Done
In June 2018

Questions: 303

Free Answers by our Experts: 229

It is very hard to master any of programming language and many students have troubles with it. That is why we have decided to render assistance for those who have difficulties with Python. Python problems are very common among students. They are tired of constant Python questions and try to find the Python answers. Ask your questions here and be sure to get the 100% truthful answers. The only thing you will have to do – is to send the request with Python questions and to have no hesitation that all your Python questions will be satisfied.

Ask Your question

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Given the lists list1 and list2 that are of the same length, create a new list consisting of the last element of list1 followed by the last element of list2, followed by the second to last element of list1, followed by the second to last element of list2, and so on (in other words the new list should consist of alternating elements of the reverse of list1 and list2). For example, if list1 contained [1, 2, 3] and list2 contained [4, 5, 6], then the new list should contain [3, 6, 2, 5, 1, 4]. Associate the new list with the variable list3.
Write a program that counts the number of words in a sentence entered by the user. Use input to get the sentence as a string; use string.split() to create a list of the words. Then the length of the list is the number of words.]
Given a variable n refers to a positive int value, use two additional variables, k and total to write a for loop to compute the sum of the cubes of the first n counting numbers, and store this value in total. Thus your code should put 1*1*1 + 2*2*2 + 3*3*3 +... + n*n*n into total. Use no variables other than n, k, and total.
Write a function flipSwitches that accepts one argument, a sequence of upper or lower case letters (the sequence can either be a str or a list, if you write your code correctly, it shouldn’t matter). This is a sequence of switches, uppercase means to turn a switch on, and lowercase to turn a switch off. For example, ‘A’ means to turn the switch ‘A’ on, and ‘a’ means to turn the switch ‘A’ off. The function should then return the set of those switches that are still on at the end of the sequence of switches. To receive full credit, your code must use a set that keeps track of the switches that are on.You can then iterate over the sequence and modify the set of switches that are on as appropriate.
>>> flipSwitches( ['A','A','a','B'] )
{'B'}
2. Write a function moreOdds that accepts one argument, a list of integers. The function then returns a bool that indicates whether the list contains(strictly) more odd numbers than even numbers. Sample output:

>>> moreOdds( [2,3,4,5,7] )
True
1. Write a function hideShow that accepts two string arguments, an input string and a masking string. The masking string is a string consisting of ‘0’s and ‘1’s that has the same length as the input string. The function then returns a new string that is the same as the input string, except that it is masked. That is, in any position where the masking string contains a ‘0’ the input character is replaced by a ‘#’, whereas if the masking string contains a ‘1’, the character is unchanged. See the following sample output:
>>> hideShow( 'apple', '11001')
'ap##e'
>>> hideShow('apple','00000')
'#####'
>>> hideShow('apple','11111')
'apple'
>>> hideShow('abcdefghijklmnopqrstuvwxyz',13*'01')
'#b#d#f#h#j#l#n#p#r#t#v#x#z'
>>> hideShow( 'df###re##', '101010101' )
'd#####e##'
>>>
An important component to becoming an effective programmer is:
Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a string inputStr for you, which is a decimal string meaning the side length L of the pizza in cm. The area of the pizza should be computed using the formula A = L*L. Then, assuming that each person needs to eat 100 cm2 of pizza, compute the number of people it can feed, rounded down to the nearest integer.
Write a program which reads an integer from input using pancakes = int(input()). If pancakes is more than 3, print out Yum! and if pancakes is not more than 3, print out Still hungry! instead.
Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and associates that value with total. Thus your code should associate 1*1 + 2*2 + 3*3 +... + 49*49 + 50*50 with total. Use no variables other than k and total.

Submit
Privacy policy Terms and Conditions