You are able to mark your answers on tests and save your work, while on paper, you get it taken away from you.
Answer:
See Explanation
Explanation:
The question would be best answered if there are options to select from; since none is provided, I will provide a general explanation.
From the question, we understand that, you are to test for Jo Wen.
Testing your program with this name will crash the program, because Jo has 2 letters (3 letters are required), and Wen has 3 letters (4 letters are required)
So, the step that needs to be revisited is when the username is generated.
Since the person's name cannot be changed and such person will not be prevented from registering on the platform, you need to create a dynamic process that handles names whose lengths are not up to the required length.
Answer:
Explanation:
#include <iostream>
using namespace std;
int costdays(int);
int costhrs(int,int);
int main()
{
int dd,hh,mm,tmph,tmpd,tmpm=0;
int pcost,mcost=0;
cout<<"Enter Parking time" << endl;
cout<<"Hours: ";
cin>>hh;
cout<<"Minutes: ";
cin>>mm;
if (mm>60)
{
tmph=mm/60;
hh+=tmph;
mm-=(tmph*60);
}
if (hh>24)
{
tmpd=hh/24;
dd+=tmpd;
hh-=(tmpd*24);
}
if ((hh>4)&&(mm>0))
{
pcost+=costdays(1);
}
else
{
mcost=costhrs(hh,mm);
}
cout<<"Total time: ";
if (dd>0)
{
cout<<dd<<"days ";
pcost+=costdays(dd);
}
pcost+=mcost;
cout<<hh<<"h "<<mm<<"mins"<<endl;
cout<<"Total Cost :"<<pcost<<"Won";
return 0;
}
int costdays(int dd)
{
return(dd*25000);
}
int costhrs(int hh,int mm)
{
int tmpm, tmp=0;
tmp=(hh*6)*1000;
tmp+=(mm/10)*1000;
tmpm=mm-((mm/10)*10);
if (tmpm>0)
{
tmp+=1000;
}
return(tmp);
}
Answer:
You can't call a function unless you've already defined it. Move the def createDirs(): block up to the top of your file, below the imports.
Explanation:
Some languages allow you to use functions before defining them. For example, javascript calls this "hoisting". But Python is not one of those languages.
Answer:
computer architecture is a set of rules and methods that describe the functionality, organization, and implementation of computer systems. The architecture of a system refers to its structure in terms of separately specified components of that system and their interrelationships.