[solved] – Question 81799

A bagel shop charges 75 cents per bagel for orders of less than a half-dozen bagels and 50 cents per bagel for orders of a half-dozen or more. Write a program that requests the number of bagels ordered and displays the price for each bagel and the total cost. Format the output results with two decimal places

Expert Answer


[solved] – Question 81881

Write a loop that reads strings from standard input, where the string is either “duck” or “goose”. The loop terminates when “goose” is read in. After the loop, your code should print out the number of “duck” strings that were read.

Expert Answer


[solved] – Question 819

Create a function triangle(s), which takes a string s as its argument and prints the successive characters of the string on each line. For example&
& >>> triangle(“CMPT”)&
C&
CM&
CMP&
CMPT&

You will implement this function in two ways:&
(a) using string slices1;&
(b) without using string slices.

Expert Answer


[solved] – Question 8190

The vowel checker was written to check
whether or not a selected vowel appears in
the name that is entered in the Edit
component. RadioButtons are used to select
the vowel. An Edit component is used to
input the name.
The btnCheck and btnLength are Disabled
initially.
The btnConvert removes the blanks and
converts the string in the Edit component
to UpperCase. The btnCheck will determine the position of the selected vowel, and
assign the result to the caption of lblResult. The btnLength will determine the number of characters in
the Edit component. If there are less than 5 the form colour is changed to red, less than 10 the colour
changes to green, less than 20 the colour changes to blue and 20 or more the colour changes to yellow.
The btnReset changes the form as given above.
i) Write the code for the event handler for the OnClick event of btnConvert. (4)
ii) Write the code for the event handler for the OnClick event of btnLength so that the length of
the string is determined and the colour of the form changes accordingly. (8)
iii) Give a print screen of the interface that YOU used for the programming of this question. Marks

Expert Answer


[solved] – Question 81916

Create a Flask Web Service that will generate lottery numbers. It should have the following capabilities. It should generate 6 numbers from 1-58
>All dates must be given in YYYY-MM-DD format
>Random numbers are generated with the date as the seed.
Get winning numbers from start date to end date
> URL: winning_numbers?start_date=<start_data>&end_data=<end_date>
> if start and/or end date are not defined, the default value is yesterday
> start date and end data cannot be greater than yesterday
> output is a json with this format
{
<date>: [1, 2, 3, 4, 5, 6],
<date>: [1, 2, 3, 4, 5, 6],

}

Expert Answer


[solved] – Question 81927

what is the difference between a RAM and a ROM according to storage

Expert Answer


[solved] – Question 81934

Write an application that displays the factorial for every integer value from 1 to 10. A factorial of a number is the product of that number multiplied by each positive integer lower than it. For example, 4 factorial is 4 * 3 * 2 * 1, or 24. The output would then be The factorial of 4 is 24.

Expert Answer


[solved] – Question 81949

So i have a canvas, an image, and a 10 input fields for y and x coordinates. When i press start button the image will move to these coordinates in an animation like movement. How can i do that?

Expert Answer


[solved] – Question 81995

Write a program that inputs the length of two pieces of fabric in feet and inches (as whole numbers) and prints the total.

Expert Answer


[solved] – Question 82046

-Weight of Package (in Kilograms) = Rate per 300 miles shipped
-2 kg or less = $1.20
-Over 2 kg but not more than 6 kg = $2.20
-Over 6 kg but not more than 10 kg = $3.80
-Over 10 kg but not more than 20 kg = $4.80

Write a program that asks for the weight of the package and the distance it is to be shipped, then displays the charges with two decimal places. Input Validation: Do not accept values of 0 or less for the weight of the package. Do not accept weight of more than 20 kg (this is the maximum weight the company will ship.Do not accept distances of less than 10 miles or more than 3,000 miles. These are the company’s minimum and maximum shipping distances.

Expert Answer