Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Challenge: Store Revenue Analysis | Section
Practice
Projects
Quizzes & Challenges
Quizze
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookChallenge: Store Revenue Analysis

Aufgabe

Swipe to start coding

You are given a data frame store that contains information on items, their prices, and the quantities sold in a small furniture shop:

ItemPriceSold
Sofa34067
Armchair15081
Dining table11579
Bookshelf16042
Kitchen cabinet7067

Your tasks are:

  1. Add a new column named 'Revenue' with the revenue of each item (multiply 'Price' and 'Sold'). To access columns, use the $ sign.
  2. Using the sum() function, calculate the total number of items sold. Save in items_sold variable and output its value.
  3. Calculate total revenue using sum() function. Save in the total_revenue variable and output its value.
  4. Find out the average price of the sold item - divide total_revenue by items_sold.

Lösung

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 40
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

close

bookChallenge: Store Revenue Analysis

Swipe um das Menü anzuzeigen

Aufgabe

Swipe to start coding

You are given a data frame store that contains information on items, their prices, and the quantities sold in a small furniture shop:

ItemPriceSold
Sofa34067
Armchair15081
Dining table11579
Bookshelf16042
Kitchen cabinet7067

Your tasks are:

  1. Add a new column named 'Revenue' with the revenue of each item (multiply 'Price' and 'Sold'). To access columns, use the $ sign.
  2. Using the sum() function, calculate the total number of items sold. Save in items_sold variable and output its value.
  3. Calculate total revenue using sum() function. Save in the total_revenue variable and output its value.
  4. Find out the average price of the sold item - divide total_revenue by items_sold.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 40
single

single

some-alt