GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

The function create_email is designed to take two parameters…

The function create_email is designed to take two parameters: username (string) and domain (string). It should return a formatted email address in the format  “username@domain.com” format. The function ensures that both input arguments are lowercase and that there are no extra spaces or missing arguments. For example,  create_email(“my_name”, “gmail”) should return “my_name@gmail.com”, and if either argument is missing, it should return “Invalid email”. However, this function contains several logic errors. Identify and correct the errors in the code snippet so that the function works as intended. You cannot change entire chunks of code or rewrite the function. Mention the line number where the error is, what the error is, and the correction. There may be multiple errors on each line, so look VERY carefully. Note: the lower, upper, and strip functions return a new string. .strip() – remove whitespace at beginning and end of string 1. def create_email(username + domain): 2. username.lower().strip()3. domain = domain.upper().strip()4. if domain == “” or domain == ” “: 5. return “Invalid email”6. email = username + domain + “.com”7. return email

Read Details

One response Mill has to an objection is that “There has bee…

One response Mill has to an objection is that “There has been ample time, namely, the whole past duration of the human species.” (in other words, there is a historical moral legacy).  Mill goes on to use, as an example, the Nautical Almanac that sailors use in order to navigate the seas.  The question is: What objection is Mill responding to here? 

Read Details

A person (let’s call him Bob) saves the life of someone (let…

A person (let’s call him Bob) saves the life of someone (let’s call him Cobb) who is drowning in a lake.  What does Mill have to say about this? 

Read Details

Cans of beans are independent and the probability that a can…

Cans of beans are independent and the probability that a can is underweight is 0.08.  If [n] cans are weighed sequentially, what is the probability that exactly [x] of them are underweight? This copywritten question is part of a quiz or exam at Arizona State.  It may not be posted to Chegg or to any other website or reproduced without the permission of the author, Dr. L. Chattin, and Arizona State University  Express your answer to four decimal places using conventional rounding methods. 

Read Details

Which of the following is an objection to utilitarianism tha…

Which of the following is an objection to utilitarianism that Mill responds to? 

Read Details

Je suis au régime ______________ trois semaines.

Je suis au régime ______________ trois semaines.

Read Details

Le frère de ma mère, c’est mon [1].

Le frère de ma mère, c’est mon [1].

Read Details

C’est la cadette de sa famille.

C’est la cadette de sa famille.

Read Details

C. Expressions de temps Complete each sentence with depuis,…

C. Expressions de temps Complete each sentence with depuis, pendant, or il y a. (8 pts.—1 ea. )

Read Details

Mill says that some kinds of pleasure are more valuable than…

Mill says that some kinds of pleasure are more valuable than others.  How are they more valuable? 

Read Details

Posts pagination

Newer posts 1 … 36,957 36,958 36,959 36,960 36,961 … 69,629 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top