Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Organizing Lab Results | Python Foundations for Chemists
Python for Chemists

bookChallenge: Organizing Lab Results

Uppgift

Swipe to start coding

Organizing and retrieving lab results is a key part of data analysis in chemistry. In this challenge, you will use lists and dictionaries to map sample names to their pH values and retrieve the pH for a specific sample.

  • Create a dictionary where each key is a sample name from the sample_names list and each value is the corresponding pH from the pH_values list.
  • If the query_sample exists in the dictionary, retrieve its pH value; otherwise, return None for the pH.
  • Return both the dictionary and the retrieved pH value.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

close

bookChallenge: Organizing Lab Results

Svep för att visa menyn

Uppgift

Swipe to start coding

Organizing and retrieving lab results is a key part of data analysis in chemistry. In this challenge, you will use lists and dictionaries to map sample names to their pH values and retrieve the pH for a specific sample.

  • Create a dictionary where each key is a sample name from the sample_names list and each value is the corresponding pH from the pH_values list.
  • If the query_sample exists in the dictionary, retrieve its pH value; otherwise, return None for the pH.
  • Return both the dictionary and the retrieved pH value.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

some-alt