Questions: 5 831

Answers by our Experts: 5 728

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

A super market plans to conduct a surprise cum lucky winner contest in a different way. The super market sells different vegetables and fruits to customers. Write a python program to accept the items purchased by number of customers under each category [Vegetables and Fruits] with their quantity (in kg) and display the total quantity of items sold under each category. Find out the common item(s) in the shopping basket of the customers. The customer, who buys the highest quantity of common item(s), will be the lucky winner and display the lucky winner customer number.

 

Write a simple python program to print and add number starting 1 onward till the sum of them is less than 100



#the required output is as the n positive number having the total sum less than 100 are .



1 2 3 4 5 6 7 8 9 10 11 12 13 sum of the numbers =91




The Josephus' problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, ..., n, standing in circle every mth is going to be executed and only the life of the last remaining person will be saved. Joseph was smart enough to choose the position of the last remaining person, thus saving his life to give us the message about the incident. For example when n = 6 and m = 5 then the people will be executed in the order 5, 4, 6, 2, 3 and 1 will be saved.INPUTEach line contains of 3 integers nand p.  n is the number of people to be executed.  m is the interval on how the people are to be executed.  p is the starting position of the execution.OUTPUTPrint the number of the person who will be saved from the execution

Design an algorithm and write the python program to determine the bonous amount he will receive as a dictionary in sorted order and then the total expenditure for the enterprise use pprint function for printing dictionary in sorted order

Write a python program to take the number of lines as input and print the following patterns

 

Input

Enter the number of lines

4

 

Output

         1

      2 4 2

   1 3 5 3 1

2 4 6 8 6 4 2

   1 3 5 3 1

      2 4 2

         1

Write a python program to accept the date of joining of service of n employees in an IT firm and count the number of employees whose number of years of service falls in the following year groups considering the following HR Policy of the firm. [Note: Consider the current date as 2021-11-30]

i) <2       ii)  2-7      iii) 8-19  iv) 20-32     v) >32

Ø  If the number of years of service is less than 2 years, then consider them [Associate Software Engineer] working under the Probation period.

Ø  If the number of years of service is in the range of 2-7 years, then consider them [Software Engineer] working as a permanent employee.

Ø  If the number of years of service is in the range of 8-19 years, then consider them [Team Leader] working as a senior employee.

Ø  If the number of years of service is in the range of 20-32 years, then consider them [Project Manager] as an executive employee.

Ø  If the number of years of service is more than 32 years, then consider them as a Retired employee.


REQUIREMENTS

The following are the required components of this assignment:

  1. Write a function to calculate and return the wind chill based on a given temperature and wind speed.
  2. Write a function to convert from Celsius to Fahrenheit. The formula for this conversion is to multiply the Celsius temperature by (9/5) and then add 32.
  3. Allow the user to enter the temperature in Celsius of Fahrenheit. If they provide it in Celsius, first convert it to Fahrenheit before using the formula above.
  4. Loop through wind speeds from 5 to 60 miles per hour, incrementing by 5, and calculate and display the wind chill for each of these wind speeds.
  5. Display the wind chill value to 2 decimals of precision.





1. Consider the loop from Section 8.3 of your textbook.


prefixes = 'JKLMNOPQ'

suffix = 'ack'


for letter in prefixes:

print(letter + suffix)


Put this code into a Python script and run it. Notice that it prints the names "Oack" and "Qack".


Modify the program so that it prints "Ouack" and "Quack" but leaves the other names the same.


Include the modified Python code and the output


2. Give at least three examples that show different features of string slices. Describe the feature illustrated by each example.


Taking some samples of DNA from patients, lets computers collect and extract important information that can be found in the DNA sequence. In this scenario, you will serve as an intern in laboratory who will be assigned an important task. You will be given a long DNA sequence, which is represented in a string of letters. Your task is to convert 3-letter codons into protein residues. The output would be the corresponding residues.

 

INPUT: DNA sequence

OUTPUT: Generated 3-letter codons and corresponding protein residues


An input sample of DNA sequence would look like this:

TGGTACTCTTTCTTCACAAGGGCGCCGTGTGTG

 

The 3-letter codons are simply every three letters in the sequence.

TGG TAC TCT TTC TTC ACA AGG GCG CCG TGT GT

 

Equivalent mapping will be: WYSFFTRAPC*


Note: The sequence might not have a multiple of 3 bases. If that happens you must map the final 1- or 2-base term to asterisk, instead.

Construct an algorithm and write a python to create a regular expression to retrieve marks and names from a given string or files. Extract only marks having 2 digits and names starting with capital letter. A word is called as a good word if all the letters of the word are distinct. That is, all the letters of the word are different from each other letter. Else, the word is called as a bad word. Write an algorithm and the subsequent Python code to check if the given word is good or bad.: e.g. START, GOOD, BETTER are bad: WRONG is good! Make the comparison to be case insensitive.




LATEST TUTORIALS
APPROVED BY CLIENTS