Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 5 : Working with dictionaries Here is a reference on dictionaries. In [ ] : pokemon nane: bulbasaur, nickname: potato, } shiny: False In

Task 5: Working with dictionaries
Here is a reference on dictionaries.
In []: pokemon
"nane": "bulbasaur",
"nickname": "potato",
}
"shiny": False
In []:
5b. Change the value of nickname from potato to something else.
In []:
5c. Add the key, value pair "type" : "grass" to the dictionary.
In []:
Task 6: Loops and If Statements
6a. Use the range function to loop through numbers and print each one.
Note: Should iterate between a range of 0 and the length of numbers
In []
In []:
6b. Loop through potato_weights and print yum if it is larger than 0.7
In []: potato_weights =[0.32,0.53,1.2,0.21,0.36,0.72,0.12,0.23,0.83,0.91,0.56]
In ] :
6c. Loop through and print each value of potato_weights until it is less than 0.2.
There are multiple ways to do this (this is not the only possible answer).
In ]:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions

Question

List benefits and costs of internal control (accounting)

Answered: 1 week ago