1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Delvig [45]
3 years ago
14

Pennies for Pay Design and write a python program to pass Lab 4-7 with the following modifications: 1.use an outer loop to keep

the program running until zero (0) day for the payroll calculation be entered 2.use an inner loop to calculate and print the daily and total payroll

Computers and Technology
1 answer:
frez [133]3 years ago
6 0

Answer:

Here you go, change it however you'd like :)

Explanation:

(A nested loop was not needed to fulfill this task)

usr = int(input("How many days would you like to calculate: "))

pen = 0.01

for n in range(1, usr + 1):

   print(f"Day: {n} | Amount: ${pen}")

   pen += pen

You might be interested in
Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, s
Afina-wow [57]

The code is implemented based on the given operations.

Explanation:

#include <iostream>

#include <string>

using namespace std;

class dayType

{ private:

 string day[7];

 string presentDay;

 int numofDays;

public:

 void setDay(string freshDay);

 void printDay() const;

 int showDay(int &day);

 int nextDay(int day);

 int prevDay(int day) const;

 int calcDay(int day, int numofDays);    

 dayType()

 {

  day[0] = "Sunday";

  day[1] = "Monday";

  day[2] = "Tuesday";

  day[3] = "Wednesday";

  day[4] = "Thursday";

  day[5] = "Friday";

  day[6] = "Saturday";

  presentDay = day[0];

  numofDays = 0;

 };

 ~dayType();

};

#endif

#include "dayType.h"

void dayType::setDay(string freshDay)

{

  presentDay = freshDay;

}

void dayType::printDay()

{

  cout << "Day chosen is " << presentDay << endl;

}

int dayType::showDay(int& day)

{

  return day;

}

int dayType::nextDay(int day)

{

day = day++;

if (day > 6)

 day = day % 7;

switch (day)

{

case 0: cout << "The successive day is Sunday";

 break;

case 1: cout << "The successive day is Monday";

 break;

case 2: cout << "The successive day is Tuesday";

 break;

case 3: cout << "The successive day is Wednesday";

 break;

case 4: cout << "The successive day is Thursday";

 break;

case 5: cout << "The successive day is Friday";

 break;

case 6: cout << "The successive day is Saturday";

 break;

}

cout << endl;

return day;

}

 

int dayType::prevDay(int day)

{

day = day--;

switch (day)

{

case -1: cout << "The before day is Saturday.";

 break;

case 0: cout << "The before day is Saturday.";

 break;

case 1: cout << "The before day is Saturday.";

 break;

case 2: cout << "The before day is Saturday.";

 break;

case 3: cout << "The before day is Saturday.";

 break;

case 4: cout << "The before day is Saturday.";

 break;

case 5: cout << "The before day is Saturday.";

 break;

default: cout << "The before day is Saturday.";

}

cout << endl;

return day;

}

int dayType::calcDay(int addDays, int numofDays)

{

addDay = addDays + numofDays;

if (addDay > 6)

 addDay = addDay % 7;

switch(addDay)

{

case 0: cout << "The processed day is Sunday.";

 break;

case 1: cout << "The processedday is Monday.";

 break;

case 2: cout << "The processedday is Tuesday.";

 break;

case 3: cout << "The processedday is Wednesday.";

 break;

case 4: cout << "The processedday is Thursday.";

 break;

case 5: cout << "The processedday is Friday.";

 break;

case 6: cout << "The processedday is Saturday.";

 break;

default: cout << "Not valid choice.";

}

cout << endl;

return addDays;

}

4 0
3 years ago
Given a sorted list of integers, output the middle integer. assume the number of integers is always odd.
Svetllana [295]

integer userInput

integer i

integer mid

integer array(20) number

userInput = 1

for i = 0; userInput >= 0; i = i + 1

  if number[i] > -1

     userInput = Get next input

     number[i] = userInput

i = i - 1

mid = i / 2

if i > 9

  Put "Too many inputs" to output

elseif i % 2 == 0

  Put number[mid - 1] to output

else

  Put number[mid] to output

4 0
2 years ago
What is a non-example of job outlook.
Papessa [141]

Answer:

Before you choose a career you should find out what its job outlook is. ... employed in a particular occupation over a set period, for example, two years, five years or ... 2% and 4%); Have little or no change (a decrease or increase of 1% or less) .

Explanation:

4 0
2 years ago
Which tool is often used by devops to facilitate the development, testing, and deployment of new software?.
ella [17]

The Jenkins tool is often used by DevOps to facilitate the development, testing, and deployment of new software.

<h3>What is software development?</h3>

The practice of conceptualizing, planning, designing, coding, documenting, testing, and bug-fixing that went into building and maintaining applications, platforms, or other software modules is known as software creation.

Jenkins is a Java-based continuous integration/continuous delivery and deployment system that is free and open-source.

Thus, the Jenkins tool is often used by DevOps to facilitate the development, testing, and deployment of new software.

Learn more about software development here:

brainly.com/question/3188992

#SPJ4

3 0
1 year ago
Which is currently the most common cellular network?<br> 4G<br> 4G LTE<br> 5G<br> 5G LTE
Misha Larkins [42]

Answer:

4GLte

Explanation:

8 0
3 years ago
Other questions:
  • The point at coordinates (2, -18) is in what direction from the origin?
    7·1 answer
  • Jeremy is typing a term paper on his computer and saves it every five minutes or so for good measure. which of the following bes
    11·1 answer
  • What is the simplest way to permanently get rid of a unwanted file
    12·1 answer
  • Which of the following is an example of new and emerging classes of software?
    11·1 answer
  • Is it important for a writer to include voice and point of view in writing because...<br> Plz help
    10·1 answer
  • Visit the quick access toolbar to find help when looking for certain commands. True False
    15·2 answers
  • Data aggregate functions
    6·1 answer
  • Which one is exit controllefd loop ?<br>1.while loop <br>2. for loop<br>3. do loop<br>4. none <br>​
    11·1 answer
  • Which tool can be used to increase the space between a bullet point or a number and text?
    11·2 answers
  • Your network has been having problems lately when users are participating in video conferences - the video and audio stutters ve
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!