CODE:
messages = {}
for i in range(26):
for j in range(26):
for k in range(26):
print(i,j,k,end='\t')#if you want 17576 entries you should print
here
text = ''#you should give empyty inverted comma's
messages[(i,j,k)]=''#you should give empyty inverted comma's
print(len())
assert len(messages) == 17576
OUTPUT:
and its still running for several minutes. You can test it.
Your challenge is to solve this. All you know is that it was encoded with a...
Use the link in the Jupyter Notebook activity to access your
Python script. Once you have made your calculations, complete this
discussion. The script will output answers to the questions given
below. You must attach your Python script output as an HTML file
and respond to the questions below.
In this discussion, you will apply the statistical concepts and
techniques covered in this week's reading about hypothesis testing
for the difference between two population proportions. In the
previous week’s discussion,...
cs55(java) please
Part 1: You are a programming intern at the student transfer counselor's office. Having heard you are taking CS 55, your boss has come to ask for your help with a task. Students often come to ask her whether their GPA is good enough to transfer to some college to study some major and she has to look up the GPA requirements for a school and its majors in a spreadsheet to answer their question. She would like...
- Complete the code to solve a maze- Discuss related data structures topicsProgramming-----------In this part, you will complete the code to solve a maze.Begin with the "solveMaze.py" starter file.This file contains comment instructions that tell you where to add your code.Each maze resides in a text file (with a .txt extension).The following symbols are used in the mazes:BARRIER = '-' # barrierFINISH = 'F' # finish (goal)OPEN = 'O' # open stepSTART = 'S' # start stepVISITED = '#' #...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
Project Description Allow the user to specify M (the size of the hash table) then, (1) add items found in text file "Project1.txt" to h, an initially-empty instance of a HASH (reject all items that have a key that duplicates the key of a previously added item—item keys must be unique); (2) display h (see format shown below); (3) delete 4 randomly-chosen items from the h; and finally, (4) display h. Note M must be a prime number, so your...
Need this in C
The starter code is long, if you know how to do it in other way
please do.
Do the best you can please.
Here's
the starter code:
//
-----------------------------------------------------------------------
// monsterdb.c
//
-----------------------------------------------------------------------
#include
#include
#include
//
-----------------------------------------------------------------------
// Some defines
#define NAME_MAX 64
#define BUFFER_MAX 256
//
-----------------------------------------------------------------------
// Structs
typedef struct
{
char name[NAME_MAX];
int hp;
int attackPower;
int armor;
} Character;
typedef struct
{
int size;
Character *list;
} CharacterContainer;
//
-----------------------------------------------------------------------
//...
In this lab you will convert lab5.py to use object oriented
programming techniques. The createList and checkList functions in
lab5.py become methods of the MagicList class, and the main
function of lab6.py calls methods of the MagicList class to let the
user play the guessing game.
A. (4pts) Use IDLE to create a lab6.py. Change the 2 comment
lines at the top of lab6.py file:
First line: your full name
Second line: a short description of what the program...
Solve it for java
Question Remember: You will need to read this assignment many times to understand all the details of the you need to write. program Goal: The purp0se of this assignment is to write a Java program that models an elevator, where the elevator itself is a stack of people on the elevator and people wait in queues on each floor to get on the elevator. Scenario: A hospital in a block of old buildings has a nearly-antique...
For this assignment, you will write a program to work with Huffman encoding. Huffman code is an optimal prefix code, which means no code is the prefix of another code. Most of the code is included. You will need to extend the code to complete three additional methods. In particular, code to actually build the Huffman tree is provided. It uses a data file containing the frequency of occurrence of characters. You will write the following three methods in the...
Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C - A consecutive group of memory chunks. D - None of the choices. Question 2 How many times is the body of the loop executed? int i=1; while(true) { cout << i; if(++i==5) break; } A - Forever B - 4 C - 5 D - 6 E - 0 Question 3 What is wrong with the following piece of...