DEV Community

Meezy
Meezy

Posted on

Python Quiz 1 Answers

These are the quiz answers from my latest youtube video. The video covers what I've learned so far and how i've been approaching my studies. Watch the video, take the quiz at the end, and come back here to see how you did.

pythonbasics

  • print("i'm learning python")
  • Sets are an unordered collection of unique elements.
  • if singer = 'beyonce', what does singer[3] ? o
  • beyKids = {'blue':1, 'sir':2, 'rumi':3}

  • while loop code

count = 0
while (count<10):
print("python")
count= count +1;

  • 10, 1.5 (these numbers can vary, just needs to be an integer and a decimal number)

  • list code

myList = [ "apple","banana","orange" ]

(fruit names can vary, variable assignment and list syntax should be similar though)

  • for loop code

for num in range(1,18):
if num % 2 != 0:
print(num)

  • python firstProgram.py
  • .keys()

Latest comments (0)