GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

Author Archives: Anonymous

Answer the following short coding questions. Do NOT write fu…

Answer the following short coding questions. Do NOT write functions and do NOT hardcode.  Given a text file called heros.txt with some consecutively duplicate lines, copy over the duplicate lines to a new text file with same name with _duplicates.txt appended.    Example:   heros.txt:  1| Iron-man is in Avengers.  2| Wolverine is in X-men.  3| Quicksilver is in Avengers & X-men.  4| Quicksilver is in Avengers & X-men.  5| Vision is in Avengers.  6| Wanda is in Avengers & X-men.  7| Wanda is in Avengers & X-men.  8| Magneto is in X-men.  The resulting file, heros_duplicates.txt: 1| Quicksilver is in Avengers & X-men.  2| Wanda is in Avengers & X-men.    Notes:   The duplicate lines should be written in the new file in the same order that they appear in the original file.  The output file can have a newline character at the end.  Words are defined as something separated by a space. For example, “iron-man” counts as one word, not two, since there is no space between “iron” and “man”.   Answer this question by typing your code in the space provided below.

Read Details

Answer the following short coding questions. Do NOT write fu…

Answer the following short coding questions. Do NOT write functions and do NOT hardcode.  Given a text file called disney.txt with some consecutively duplicate lines, copy over the duplicate lines to a new text file with same name with _repeated.txt appended.    Example:   disney.txt:  1| Iron-man is in Avengers. 2| Wolverine is in X-men. 3| Quicksilver is in Avengers & X-men. 4| Quicksilver is in Avengers & X-men. 5| Vision is in Avengers. 6| Wanda is in Avengers & X-men. 7| Wanda is in Avengers & X-men. 8| Magneto is in X-men. The resulting file, disney_repeated.txt:  1| Quicksilver is in Avengers & X-men. 2| Wanda is in Avengers & X-men.    Notes:   The duplicate lines should be written in the new file in the same order that they appear in the original file.  The output file can have a newline character at the end.  Words are defined as something separated by a space. For example, “iron-man” counts as one word, not two, since there is no space between “iron” and “man”.   Answer this question by typing your code in the space provided below.

Read Details

Convert the following switch into a functionally identical i…

Convert the following switch into a functionally identical if/elseif/else by arranging the provided lines of code in the correct order. Many of the lines will NOT be used. You’ve just gotten into comics and are about to call someone out on TikTok for failing to know the difference between a “hero” and a “superhero”, but don’t want to make the same mistake. You searched Reddit and found an algorithm to help you decide which word to use but your MATLAB is broken and doesn’t allow for the use of switch. You need to convert this algorithm quick so you can turn on the burner and flame this fool.  Rearrange the lines of code to create a block of code that is functionally identical to the following:  switch power     case ‘laser eyes’         class = ‘super hero’    case {‘karate’, ‘wealth’}         class = ‘regular hero’    otherwise         class = ‘human’ end  Available lines to rearrange… A – if isequal(power, ‘laser eyes’) B – class = ‘regular hero’ C – if isequal(power, ‘wealth’, ‘karate’) D – end E – power = ‘wealth’ F – power = ‘laser eyes’ G – class = ‘human’ H – else I – class = ‘other’ J – elseif isequal(class, ‘super hero’) K – elseif isequal(class, ‘human’) L – if isequal(power, ‘wealth’) & isequal(power, ‘karate’) M – if isequal(class, ‘regular hero’) N – class = ‘super hero’ O – power = ‘karate’ P – elseif isequal(power, ‘laser eyes’) Q – if isequal(power, ‘wealth’) | isequal(power, ‘karate’)   Show your answer by typing the letters that proceed your line choices in the appropriate order in the space provided below. Your answer should be a sequence of letters such as AGFLKNEM. Not all lines will be used.

Read Details

Convert the following switch into a functionally identical i…

Convert the following switch into a functionally identical if/elseif/else by arranging the provided lines of code in the correct order. Many of the lines will NOT be used.  You’ve just gotten into comics and are about to call someone out on TikTok for failing to know the difference between a “hero” and a “superhero”, but don’t want to make the same mistake. You searched Reddit and found an algorithm to help you decide which word to use but your MATLAB is broken and doesn’t allow for the use of switch. You need to convert this algorithm quick so you can turn on the burner and flame this fool.  Rearrange the lettered lines of code to create a block of code that is functionally identical to the following:  switch ability     case ‘utility belt’         type = ‘hero’     case {‘flying’, ‘teleportation’}         type = ‘superhero’    otherwise         type = ‘civilian’ end  Available lines to rearrange… A – ability = ‘flying’ B – ability = ‘utility belt’ C – else D – end E – if isequal(ability, ‘flying’) & isequal(ability, ‘teleportation’) F – elseif isequal(type, ‘civilian’) G – if isequal(ability, ‘flying’, ‘teleportation’) H – type = ‘civilian’ I – if isequal(type, ‘superhero’) J – ability = ‘teleportation’ K – if isequal(ability, ‘utility belt’) L – type = ‘other’ M – type = ‘hero’ N – type = ‘superhero’ O – elseif isequal(type, ‘hero’) P – elseif isequal(ability, ‘utility belt’) Q – if isequal(ability, ‘teleportation’) | isequal(ability, ‘flying’)   Show your answer by typing the letters that proceed your line choices in the appropriate order in the space provided below. Your answer should be a sequence of letters such as AGFLKNEM. Not all lines will be used.

Read Details

Which vessel is label B, (the second line from the top, whic…

Which vessel is label B, (the second line from the top, which is the knee)?

Read Details

During an EPS the rhythm below was induced. What is recommen…

During an EPS the rhythm below was induced. What is recommended intervention to treat the final rhythm shown?  

Read Details

The average CO measured by comparing O2 consumption from the…

The average CO measured by comparing O2 consumption from the lungs to the O2 extracted by the tissues?

Read Details

Answer the following question by filling in the blanks below…

Answer the following question by filling in the blanks below. Do NOT write functions, and do NOT hardcode.  You’re Iron man’s new Jarvis (Jarvis 2.0), and your first task is to organize all the enemy data Jarvis 1.0 has acquired over the years! Your current directory contains multiple Excel files with data on each enemy. The format of these Excel files is given in the example below.  Fill in the blanks labeled (a)-(f) in the following code based on the comments provided. You are not restricted to one line – you may write as many lines as you may need per blank.       Notes:  You can assume all files in the current directory are valid Excel files with the same data labels, in the same order.   The  cell2struct and struct functions are BANNED. You MUST use the dot operator to create the temporary structure.  numEnemy  is a positive integer.  You are guaranteed to have enough enemy files in the current directory to satisfy the numEnemy .     Example:  In the current directory…    Show your answers in the space provided below. Please indicate each answer by preceding it with the same letter (a)-(f) that marks each blank in the code above. 

Read Details

Quartiles are categorical variables that separate the data i…

Quartiles are categorical variables that separate the data into quarters.

Read Details

To begin with Tableau, we need to first connect Tableau to t…

To begin with Tableau, we need to first connect Tableau to the data source that must be local on our computer.

Read Details

Posts pagination

Newer posts 1 … 47,855 47,856 47,857 47,858 47,859 … 68,448 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top