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

bookChallenge: Organizing Lab Results

Tehtävä

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.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 5
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

close

bookChallenge: Organizing Lab Results

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 5
single

single

some-alt