Questions: 5 831

Answers by our Experts: 5 728

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Use the code snippet provided below as the basis for your work on each question in Assignment 6. Note that you may need more than two for loops for shapes in some of the questions.

for i in range(3):
for j in range(3-i):
print("*", end=" ")
print("")
Question 1 Instructions
Use the code snippet above to write a program that uses looping to output the following shape:

FIRST
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
* * * * * * * * *
can you please help me help my son with this assignment . he is new to this and we are so stuck

In this assignment, you will use all of the graphics commands you have learned to create an animated scene. Your program should have a clear theme and tell a story. You may pick any school-appropriate theme that you like.

The program must include a minimum of:

5 circles
5 polygons
5 line commands
2 for loops
1 global variable
You may wish to use the standard boilerplate code for simplegui graphics
You have decided to start a website and are creating a chatbot prototype to show investors so you can raise money and launch your website.
Your chatbot should ask the user the following (minimum requirements for the autograder) and then give answers depending on the answers the user inputs:
at least 5 questions, and
at least 2 if-elif-else statements.
Based on this criteria, some responses will be based on what the user types, and some will be based on random numbers.
For example, if the chatbot asks how the user is doing, your chatbot might respond I’m sorry to hear that. in response to a user input of sad, or That's great! in response to a user input of happy.
Additionally, you could also have a random number generated between, say, 1 and 3 and have a corresponding response depending on the number to randomly answer with That is great to hear. or So interesting., and so on.
Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on your computer and catch the errors with try: except: blocks. Include the code and output for each example in your post.

Describe how you might deal with each error if you were writing a large production program. These descriptions should be general ideas in English, not actual Python code.
Write a for loop to print the numbers from 20 to 30
Describe how catching exceptions can help with file errors. Write three Python examples that actually generate file errors on your computer and catch the errors with try: except: blocks.Describe how you might deal with each error if you were writing a large production program.
How to format each dictionary item as a text string in the input file.
How to covert each input string into a dictionary item.
How to format each item of your inverted dictionary as a text string in the output file.
Create an input file with your original three-or-more items and add at least three new items, for a
total of at least six items.
Include the following in your Learning Journal submission:
The input file for your original dictionary (with at least six items).
The Python program to read from a file, invert the dictionary, and write to a different file.
The output file for your inverted dictionary.
A description of how you chose to encode the original dictionary and the inverted dictionary in
text files
Describe how catching exceptions can help with file errors. Write three Python examples that
actually generate file errors on your computer and catch the errors with try: except: blocks.
Include the code and output for each example in your post.
Describe how you might deal with each error if you were writing a large production program. These
descriptions should be general ideas in English, not actual Python code.
Create a Python dictionary that returns a list of values for each key. The key can be whatever type. Design the dictionary so that it could be useful for something meaningful. Create at least three different items in it.
Start with the following Python code.

alphabet = "abcdefghijklmnopqrstuvwxyz"

test_dups = ["zzz","dog","bookkeeper","subdermatoglyphic","subdermatoglyphics"]

test_miss = ["zzz","subdermatoglyphic","the quick brown fox jumps over the lazy dog"]


def histogram(s):
d = dict()
for c in s:
if c not in d:
d[c] = 1
else:
d[c] += 1
return d

The function has_duplicates should take a string parameter and return True if the string has repeated characters. Otherwise, it should return False.
Use has_duplicates by creating a histogram using the histogram function above.
Write a loop over the strings in test_dups list.
write a function missing_letters that takes a string parameter and returns a new string with all the letters of the alphabet that aren't in the argument string. The letters in the returned string should be in alphabetical order
LATEST TUTORIALS
APPROVED BY CLIENTS