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
Nikolay [14]
2 years ago
9

Try using the index method yourself now! Using the index method, find out the position of "x" in "supercalifragilisticexpialidoc

ious" in python
Computers and Technology
1 answer:
lbvjy [14]2 years ago
4 0

To use the index method to  find out the position of "x" in "supercalifragilisticexpialidocious", you would execute the following code:

word = "supercalifragilisticexpialidocious"

print(word.index("x"))

<h3>How to use the index method in Python?</h3>

This is used to return the first position of the occurrence of a specific value and if the value is not found, an exception is raised.

Therefore, to write in python, you would write out the syntax of the word, and then add the print command with the index of the word you want to find as listed above.

Read more about python programming here:

brainly.com/question/26497128

#SPJ1

You might be interested in
A friend knows I'm taking a technology class in college and asks me how a hard drive works. What should I say to a friend about
kramer
It's the main store of data on a computer. It's involatile, so data isn't lost when power is switched off. Relatively speaking, it's slow to access compared to the rest of the memory in the computer. Part of it can also become virtual memory when the RAM is full
4 0
3 years ago
Write a program that determines the price of a movie ticket (similar to the one in the chapter). The program asks for the custom
goblinko [34]

Answer:

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

Explanation:

Okay, here are the steps to be taken in order to be able to Write a program that determines the price of a movie ticket as given in details in the question above. Therefore, checked the steps below;

==> Input the age and the time.

==> If the age is not greater than 13, input the time(that is <1700) and follow it by imputing the price.

And if the age is greater than 13, you will also need to input the price. Just as below;

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

6 0
4 years ago
3.
gulaghasi [49]

Explanation:

the process of displaying the information from the table is called query

<h2>hey friend </h2><h2>your answer is here </h2><h2>I hope it will be helpful you </h2><h2>please mark as brainiest answer </h2><h2>thank you </h2>
7 0
3 years ago
Return a version of the given string, where for every star (*) in the string the star and the chars immediately to its left and
lana [24]

Answer:

Explanation:

The following code is written in Java and uses a for loop with a series of IF ELSE statements to check the next and previous characters in a string. Checking to make sure that there are no asterix. If so it adds that character to the String variable output. Which is returned to the user at the end of the method. Two test cases have been created and the output can be seen in the attached image below.

class Brainly {

   public static void main(String[] args) {

       System.out.println(starOut("sm*eilly"));

       System.out.println(starOut("ab**cd"));

   }

   public static String starOut(String str) {

       String output = "";

       for (int i = 0; i < str.length(); i++) {

           if ((i != 0) && (i != str.length()-1)) {

               if ((str.charAt(i-1) != '*') && (str.charAt(i+1) != '*') && (str.charAt(i) != '*')) {

                   output += str.charAt(i);

               }

           } else {

               if ((i == 0) && (str.charAt(i) != '*') && (str.charAt(i+1) != '*')) {

                   output += str.charAt(i);

               } else if ((i == str.length()-1) && (str.charAt(i) != '*') && (str.charAt(i-1) != '*')) {

                   output += str.charAt(i);

               }

           }

       }

       return output;

   }

}

4 0
3 years ago
Which of the following is an example of an output device on a smartphone?
Andru [333]

Answer:

The speaker

Explanation:

Speakers are output devices because the audio is taken from the app or website and playing it towards the speakers.

7 0
3 years ago
Other questions:
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • Ethan is a systems developer. He is working on a system where he will implement independent solutions for different processes. W
    14·1 answer
  • Given a link with a maximum transmission rate of 11.7 Mbps. Only two computers, X and Y, wish to transmit starting at time t = 0
    13·1 answer
  • For Official Use Only (FOUO) and Controlled Unclassified Information (CUI) may include all of the following except: (circle one)
    13·1 answer
  • 2. Name the three building blocks of design that pertain to form.
    7·1 answer
  • Write a method that accepts a string as an argument and returns a sorted string. For example, sort("acb") returns abc. Write a t
    6·1 answer
  • hen a computer user stored data in computer memory, it required 1,024 bytes. How many KB does this represent?
    8·1 answer
  • Write an essay about yourself based on the dimensions of ones personality​
    9·1 answer
  • An algorithm whose worst-case time complexity is bounded above by a polynomial function of its size is called a(n)
    13·1 answer
  • What do macOS and Windows use to prevent us from accidentally deleting files?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!