1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
podryga [215]
3 years ago
11

Write a python program that:

Computers and Technology
1 answer:
KatRina [158]3 years ago
3 0

Answer:

Explanation:

The following code is written in Python and creates a tuple of 5 integer numbers and then prints out the tuple. Tuples are immutable objects meaning that they cannot be changed at all. Therefore, they have no append methods and cannot have any values added or removed so the last two tasks of this question are impossible to accomplish.

my_tuple = (2, 5, 7, 9, 6)

print(my_tuple)

You might be interested in
Write a C program that counts the number of vowels in a word. The C program reads words from an input file and then stores in an
polet [3.4K]

Answer:

Explanation:

The following code is written in C and does what the question requires. It uses the input file reads it and outputs the number of vowels to the file called output.dat

#include <ctype.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int str_count_in_chars(char *start, char *end, char *chars) {

   int count = 0;

   for (; start != end; count += !!strchr(chars, *(start++)));

   return count;

}

void str_swap_in_chars(size_t str_len, char **str, char *chars) {

   for (int front = 0, back = str_len - 1; front < back; front++) {

       if (strchr(chars, (*str)[front])) {

           for (; !strchr(chars, (*str)[back]); back--);

           char tmp = (*str)[front];

           (*str)[front] = (*str)[back];

           (*str)[back--] = tmp;

       }

   }

}

char *file_to_str(FILE *fin) {

   int buf_len = 64;

   char buf[buf_len];

   char *str = malloc(buf_len);

   str[0] = '\0';

   for (int i = 1; fgets(buf, buf_len, fin); i++) {

       if (!(str = realloc(str, i * buf_len))) {

           fprintf(stderr, "%s:%d realloc failed\n", __FILE__, __LINE__);

           exit(1);

       }

       strcat(str, buf);

   }

   return str;

}

int main() {

   char *vowels = "aeiou";

   FILE *fin = fopen("input.dat", "r");

   FILE *fout = fopen("output.dat", "w");

   if (!fin || !fout) {

       fprintf(stderr, "%s:%d fopen failed\n", __FILE__, __LINE__);

       exit(1);

   }

   char *words = file_to_str(fin);

   fclose(fin);

   int words_len = strlen(words);

   for (int i = 0; i < words_len;) {

       if (isspace(words[i])) {

           fputc(words[i++], fout);

           continue;

       }

       int start = i;

       for (; i < words_len && !isspace(words[i]); i++);

       char *word = words + start;

       int word_len = i - start;

       int vowel_count = str_count_in_chars(word, words + i, vowels);

       if (vowel_count % 2 == 0) {

           str_swap_in_chars(word_len, &word, vowels);

       }

       fprintf(fout, "%.*s_%dvow", word_len, word, vowel_count);

   }

   fclose(fout);  

   free(words);

   return 0;

}

5 0
3 years ago
What are the other way of getting website static​
erica [24]

Answer:

Explanation: Jekyll. Jekyll is far and away the most popular static site generator. ...

Hexo. Hexo is a build tool created with nodeJS, which allows for super speedy rendering, even with extremely large sites

and Hugo

I hope this help =D

7 0
3 years ago
Read 2 more answers
How many 64 x 8 memory chips are needed to provide 4096 x 16 memory capacity? Create 4096 x 16 memory with the required number o
Licemer1 [7]

Answer:

i World sat 4

Explanation:

i got th3 answer right

4 0
2 years ago
What option would fit the most content on a page?
zvonat [6]

Answer:

normal margins will fit the most content on a page

7 0
2 years ago
What are some options available in the Spelling and Grammar Checker? Check all that apply
IceJOKER [234]

This question is incomplete because it lacks the appropriate options

Complete Question

What are some options available in the Spelling and Grammar Checker?

Check all that apply.

a) Change and Change All

b) Redo and Repeat

c) Ignore Once and Ignore All

d) Add to Dictionary

e) AutoFormat

f) Font

g) AutoCorrect

h) Undo

Answer:

a) Change and Change All

c) Ignore Once and Ignore All

d) Add to Dictionary

g) AutoCorrect

Explanation:

Spelling and grammar check is an option under the REVIEW Menu in Microsoft Word.

Spelling and grammar checker is used to check for errors in spelling and grammar found in a Microsoft Word document.

Some options available in Spelling and grammar checker are:

• Change and Change All

• Ignore Once and Ignore All

• Add to Dictionary

• AutoCorrect

4 0
3 years ago
Read 2 more answers
Other questions:
  • Which process refers to starting up a computer?
    15·2 answers
  • One reason for using social media is to develop social and professional contacts. True or False?
    9·1 answer
  • The text discusses three different steps when processing input. Which of the following is (are) one of those steps? (Check all t
    8·1 answer
  • Host Y sends the first TCP ACK message for the transaction?<br><br> a. true<br><br> b. false
    9·1 answer
  • A canister is released from a helicopter 500m above the ground. The canister is designed to withstand an impact speed of up to 1
    15·1 answer
  • Mention any three features of an antivirus software? ​
    5·1 answer
  • Freee poiiiiintttttssss​
    14·2 answers
  • The _____ Tag surrounds all content that will be visible on your web page for all to users to see on that website.
    13·1 answer
  • Kelly is evaluating the following image. Which of the statements that she makes about the photograph is true?
    5·1 answer
  • What is the result when you run the following program?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!