[Tutor] Trouble Learning Python

andy-rhodes andy-rhodes at lambdastudents.com
Wed Jan 27 19:17:26 EST 2021


I have a couple of questions. I can't get this.



2.3 Add two Boolen variables together to equal 0 and again to equal 1.

Create a variable called zero that adds together two boolean values and returns 0. Create another variable called one that adds together two other boolean values and returns 1





# Create your variables here



zero = False

one = True



my_age = 35

your_age = 50





zero = my_age == your_age



print (zero)



bill_age = 65



Msry_age = 65



one = bill_age == Msry_age



print (one)



this is my attempt which gets errors




2.4 Let's create a dictionary!

We'll make a dictionary that contains just a few entries. Remember that a Python dictionary consists of key:value pairs. The keys are like the name of the item and the value tells us something about that item.

Your dictionary will be have three entries (three keys in this case) and a value for each key. We'll choose types of fruit and how many we have of each. A basic dictionary structure with the name myfruit was created for you using the { } - fill in the rest!



# Create a dictionary

# Delete fruit1, fruit2, num1, num2 and then

# uncomment and fill in with YOUR VALUES





 myfruit = {'banana':num1, 'kiwi'num2}






Andy Rhodes

Student

Full-Stack Web Development | Lambda School

He/Him


















tel:832-439-0708








mailto:andy-rhodes at lambdastudents.com








https://www.lambdaschool.com/








1913 Pagemill Lane, Conroe, TX 77304














https://www.facebook.com/iovercame/




https://twitter.com/skinnyman180




https://www.linkedin.com/in/arhodes09/




https://www.instagram.com/stdjar42/




















https://www.hubspot.com/email-signature-generator?utm_source=create-signature


More information about the Tutor mailing list