what's wrong with this python code i don't know what's wrong with both of them

What's Wrong With This Python Code I Don't Know What's Wrong With Both Of Them
What's Wrong With This Python Code I Don't Know What's Wrong With Both Of Them

Answers

Answer 1

Answer:

Keep it in the format

first one:

def swapping_stars():

   line_str = ""

   for line in range(6, 8):

       for char in range(0, 6):

           if line % 2 == char % 2:

               line_str = line_str + "*"

           else:

               line_str = line_str + "-"

           print(str(line_str))

swapping_stars()

second one:

if you want it to go:

23456

def print_numbers(list):

   for i in range(1, len(list)):

       print(str(list[i]))

num_list = [1, 2, 3, 4, 5, 6]

print_numbers(num_list)

if you want it to go

123456

def print_numbers(list):

   doneONE = False

   for i in range(1, len(list)):

       if not doneONE:

           print(str(list[i] - 1))

           doneONE = True

       print(str(list[i]))

num_list = [1, 2, 3, 4, 5, 6]

print_numbers(num_list)

Explanation:


Related Questions

Fatima has 3 packs of batteries. Each pack contains 4 batteries. She gives her brother 8 batteries to put in his toy robot. Let b represent the number of batteries Fatima has left. Which equation could be used to find the value of b?

Answers

Answer: See explanation

Explanation:

Let b represent the number of batteries Fatima has left.

The equation that can be used to find the value of b goes thus:

(3 × 4) = b + 8

12 = b + 8

b = 12 - 8

Therefore, based on the above equation, the number of batteries that Fatima has left will be 4.

Complete the sentence.
You might create algorithms and flowcharts during the ______ phase of software development.

Release

Planning

Design

Coding

Answers

You might create algorithms and flowcharts during the Design phase of software development.

What is the algorithms  about?

In software development, the Design phase is a crucial step in which the developers plan and determine how the software will be built. This involves breaking down the requirements and specifications into smaller, manageable components and then figuring out how these components will work together.

Therefore, to accomplish this, developers often create diagrams, such as flowcharts or algorithms, to help visualize the software's logic and structure. These diagrams can then be used to guide the development of the software, ensuring that all parts of the project are aligned and working towards the same goals.

Learn more about algorithms from

https://brainly.com/question/20543449

#SPJ1

one day when rahul went to his computer lab and saw that all the computers were connected to a single printer and whoever is giving a command to print, the print out comes from that printer. can you name the concept of communication? class 8 computer one word answer..​

Answers

Explanation:

you can connect multiple PCs to the wireless printer and print your documents from each one of them as long as the printer can be connected to the same network . You need the disc that came with the wireless printer to install the correct drivers on your computers and laptops.

hope it helps ( brainleist please )

the advantages and disadvantages of internet​

Answers

Advantages : a lot of useful information from all around the world
Disadvantage:, cyberbullying, stalking, hacking

(WEB DESIGN FINAL QUESTION) PLEASE HELP
what is a trademark?

Answers

Answer:

a trade mark is something where someone owns the rights to something in a specific country

Identify the characteristics of syntax errors. Choose all that apply.
programmer did not follow the program language conventions
may be highlighted while writing the program
can be caused by mistyping or misspelling while writing the program
does not cause an error message

Answers

Answer:

Explanation:

Identify the characteristics of syntax errors. Choose all that apply.

programmer did not follow the program language conventions

may be highlighted while writing the program

can be caused by mistyping or misspelling while writing the program

Answer:

Its A B C i got it right

Explanation:

What would you classify anti-malware software as?


SaaS

enterprising

cloud

security

Answers

Answer:

enterpriseing is the answer

HELPPPP KOKICHI IS OUT TO KILL ME

Answers

Oh my- good luck with that-

Answer:

rest in piece :(

Explanation:

She goes to look at her
HTML code to see what is wrong line by line until she can figure out what she
messed up. Which process is Ana using?

A. Fragmentation
B. Identification
C. Pinpoint
D. Debugging

Answers

Debugging is the answer

The process is Ana using is Debugging. Check below to see what the term is all about.

What is debugging used for?

Debugging is known to be the act of working on how a given program runs, and also how it creates data so as to be able to defects and know issues in a given code.

Note that since she goes to look at her HTML code to see what is wrong line by line until she can figure out what she messed up, she is engaged in debugging.

Learn more about Debugging from

https://brainly.com/question/163290

#SPJ2

Select the correct answer from each drop-down menu.
Complete the following sentences.

_________ effort is an important and necessary factor for the success of any project. In software development projects,
_______team members carry out several tasks to ensure the quality of the process and the final product.

Options for the first box are: managers, A teams, an individuals

Options for the second box are:internal, specific, external

Answers

Answer:

First, A teams, Second ,Specific

Explanation:

Many applications ask, "Why did you leave your previous position?" Choose the best answer out of the examples below.

Answers

We can't see the examples therefore we can't help you try asking the question again with a picture of the examples

A chain of coffee servers is sending a spreadsheet of projected costs and profits to some of its investors. When, Kyle, the administrator making the spreadsheet, adds an image of his company’s logo, he realizes it would fit and look best if turned to read sideways.

How can Kyle change the image to make it fit in such a way?

He can select the image and hold down on the green handle above it while sliding the mouse.
He can select the image and hold down Control while sliding the scroll bar to the right.
He can press the PivotTable button and select “Rotate 90 degrees” and then click OK.
He can click on the Pictures Tool tab and select press Artistic Effects to access the rotate option

Answers

Answer:

On a spreadsheet application including MS Excel;

He can select the image and hold down the rotation handle above it while sliding the mouse

Explanation:

Manual rotation of a picture or a text box can be performed by selecting the image or text box in MS Word or a spreadsheet application such as MS Excel. With the mouse select the rotation handle of the picture and drag in the direction desired, left or right.

So as to limit the rotation to 15 degrees hold down the shift button while dragging the rotation handle by clicking on it with a mouse and dragging in the desired direction

You are working on a ticketing system. A ticket costs $10. The office is running a discount campaign: each group of 5 people is getting a discount, which is determined by the age of the youngest person in the group. You need to create a program that takes the ages of all 5 people as input and outputs the total price of the tickets. Sample input: 55 28 15 38 63 sample output: 42.5 the youngest age is 15, so the group gets a 15% discount from the total price, which is $50 - 15% = $42.5

Answers

Answer:

Explanation:

The following program is written in Java. It takes 5 inputs of int values for the ages of each member in the group. Then it loops through all of the ages and chooses the youngest age. Finally, it applies that age as a discount to the final price which would be $50, outputting the final discounted price. The output for the test case provided can be seen in the attached picture below in red.

import java.util.Scanner;

class Brainly

{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       int[] person = new int[5];

       System.out.println("Enter age of individual 1: ");

       person[0] = in.nextInt();

       System.out.println("Enter age of individual 2: ");

       person[1] = in.nextInt();

       System.out.println("Enter age of individual 3: ");

       person[2] = in.nextInt();

       System.out.println("Enter age of individual 4: ");

       person[3] = in.nextInt();

       System.out.println("Enter age of individual 5: ");

       person[4] = in.nextInt();

       int youngest = person[0];

       for (int x = 0; x < person.length; x++) {

           if (person[x] < youngest) {

               youngest = person[x];

           }

       }

       double discount = 1 - (((double)youngest) / 100);

       double output = 50 * discount;

       System.out.println("Total Price: " + output + " the youngest is " + youngest);

   }

}

select all the correct answers
which two programming languages are most commonly used to write web based software programs?
1. Python
2. C
3. PHP
3. Ada

Answers

Answer:

PythonPHP

Explanation:

Plato Correct!

The two programming languages most commonly used to create software for websites are Python and PHP.

We have,

Python is known for being easy to understand and read, which makes it popular for building web applications.

It has tools and frameworks that help developers create websites quickly.

PHP is a language specifically designed for web development.

It is used to write code that runs on the server and helps create interactive websites.

Many popular websites and content management systems, like WordPress, are built with PHP.

While the C language can also be used for web development, it is not as commonly used as Python and PHP in this context.

Ada is a programming language mainly used in specialized industries like aerospace and defense.

It is not commonly used for creating websites.

Thus,

The two programming languages most commonly used to create software for websites are Python and PHP.

Learn more about programming languages here:

https://brainly.com/question/23959041

#SPJ4

What are good components to preorder a PC with that are cheep? It would be my first PC by the way.

Answers

Answer:

Good Components

.CPU AMD Threadripper 3960X Amazon

.CPU cooler NZXT Kraken X63 (280mm AIO liquid cooler) Overclockers

.GPU Zotac Gaming GeForce GTX 1660 6GB CCLonline

.Memory 32GB Corsair Dominator Platinum RGB 3200MHz Scan

Explanation:

Would you want a prebuilt? I know a very good prebuilt and custom build company called NZXT. They have very good parts and very good ratings. I know prebuilts are shamed on, but I promise you, one of the NZXT prebuilts are great.

You have created a group policy that prevents users in the accounting department from accessing records in a database that has confidential information. The group policy is configured to disable the search function for all users in the Accounting OU no matter which workstation is being used. After you configure and test the policy, you learn that several people in the Accounting OU have valid reasons for using the search function. These users are part of a security group named Managers. What can you do to prevent the Group Policy object (GPO) that you have configured from applying to members of the Managers group

Answers

Answer: Add the Managers group to the GPO's discretionary access control list (DACL).

Deny the apply Group Policy and read permissions to the Managers group.

Explanation:

To prevent the Group Policy object (GPO) which had been configured from applying to the members of the Managers group, the Managers group should be added to the GPO's discretionary access control list (DACL).

Likewise, the apply Group Policy can be denied and read permissions to the Managers group. This will further help in the prevention of users.

Which of the following images illustrates safe driving?

Answers

Answer:

bottom left

Explanation:

Answer:

keep your eyes on the road!!!!

Opportunity and Spirit, NASA's Mars Exploration Rovers, were the first scientific instruments able to collect samples directly from the surface of Mars. One of the mission's goals was to determine the likelihood that life ever existed on Mars. How were Spirit and Opportunity best able to supply evidence that in the distant past Mars may have had an environment favorable to life?

Answers

Answer:

The rovers sent images of cross beds, centimeter-scale areas in rock layers, that could indicate whether water once flowed on Mars.

Explanation:

This isn't academic, but what do I do if HI-REZ won't let me sign into an existing account. “Something went wrong” keeps popping up when I type in the correct info

Answers

Answer:

contact their support

Explanation:

adassadad saflalfaklfajfklajfalkfjalkfjalkfalkf

Answers

Answer:

this belongs on r/ihadastroke

Explanation:

Answer: ok

Explanation:

Choose the expression that belongs in the blank in order to have the output shown.

>>> a = 5
>>> print(_____)
The value is5

"The value is " + str(a)

"The value is" , str(a)

"The value is " , str(a)

"The value is" + str(a)

Answers

Answer:

Option B

Explanation:

Given

a = 5

and if the value allotted to variable a is to be printed, the following command will be used

print "The values is", str(a)

Hence, option B is correct

can you help me with my homework what should i do

Answers

Answer:

what is matter and two examples

Rob is planning his housewarming party. He wants to design an invitation and personalize it for each invitee. He needs to create a list of invitees, design the card, and personalize the card. How should he complete the tasks? a. Use mail merge for steps 1 and 2 and a word processor for step 3. b. Use a graphics software for step 1, mail merge for step 2, and a word processor for step 3. c. Use a word processor for steps 1 and 2 and a graphics software for step 3. d. Use a word processor for step 1, graphics software for step 2, and a mail merge for step 3.

Answers

Answer:

1: Word Processor

2: Graphics Software

3: Mail Merge

Explanation:

Given

1. Create a list of invitees

2. Design an invitation card

3. Personalize the card

Creating a list of invitees is a task that requires basic activities such as typing, using of numbers and bullets; these activities can be achieved using word processing software programs such as Microsoft Word, WordPerfect, amongst others.

So task 1 requires a word processor

An invitation card is a piece of graphics that can be perfectly handled by graphics software programs such as CorelDraw, Adobe Photoshop, etc.

So task 1 requires a graphics software

Task 3 can be achieved using mail merge and this is because mail merge can be used either to print or to mail recipients. While mailing the recipients, one can easily personalize each letter (or in this case, an invitation card) to suit the recipient it is being directed to.

HELPPP ME PLEASEEE!!

Answers

It’s the last one! The key to an effective persuasion is to know what you want and be clear about your response.

technically a coding question utilizing python how would one calculate a square root

Answers

Answer:

import math

math.sqrt( x )

Explanation:

The basic code that can be written to calculate the square root of a number is as follows

import math

math.sqrt( x )

write examples of hacking in internet?​

Answers

Answer:

Although hacking is very bad, it can be found everywhere and anywhere.

Examples: Phishing, password checking, and keyloggers

Explanation:

Explanation:

Hacking is an attempt to exploit a computer system or a private network inside a computer. Simply put, it is the unauthorised access to or control over computer network security systems for some illicit purpose.

To better describe hacking, one needs to first understand hackers. One can easily assume them to be intelligent and highly skilled in computers. In fact, breaking a security system requires more intelligence and expertise than actually creating one. There are no hard and fast rules whereby we can categorize hackers into neat compartments. However, in general computer parlance, we call them white hats, black hats and grey hats. White hat professionals hack to check their own security systems to make it more hack-proof. In most cases, they are part of the same organisation. Black hat hackers hack to take control over the system for personal gains. They can destroy, steal or even prevent authorized users from accessing the system. They do this by finding loopholes and weaknesses in the system. Some computer experts call them crackers instead of hackers. Grey hat hackers comprise curious people who have just about enough computer language skills to enable them to hack a system to locate potential loopholes in the network security system. Grey hats differ from black hats in the sense that the former notify the admin of the network system about the weaknesses discovered in the system, whereas the latter is only looking for personal gains. All kinds of hacking are considered illegal barring the work done by white hat hackers.

Kevin is scanning old images from his college library. He might use these scanned images in the college magazine. He might also use them on the college website. What is the best practice for Kevin to follow when scanning the images?
A.
scan the images with 72 DPI
B.
scan only the images that are ideal for a website
C.
scan the images with 150 DPI
D.
scan the images with 600 DPI
E.
scan the images that are ideal for a magazine

Answers

Answer: D. Scan the images with 600 DPI

Explanation:

Answer: D. Scan the images with 600 DPI

Explanation: Correct for Plato/Edmentum

What programs are always running when your computer is turned on? Enter the names of the programs in the space provided. Click the Submit button when you are finished to view the suggested response.

Answers

Answer:

open your task manager

Explanation

right click the toolbar below and click on task manager and you will see what programs are running on your pc

Answer:

Items commonly found in the system tray include antivirus settings; battery status; and volume. Sometimes e-mail programs, printers, or faxes are also present. Your computer may have other items in the system tray too.

Explanation:

I just took  a test on edguenity and that was the correct answer hope this helps

What is the web page path on the web server for the URL:
http://www.mydomain.com/main/index.html?
O http://
O www.mydomain
O main/index.html
O index.html

Answers

Answer:

C: main/index.html

Explanation:

Select the factors that a network engineer is most likely to consider when designing a computer network. the ways in which employees share business documents the number of hours employees work the number of networked computers the type of work done at networked computers the number of employees using each computer the rate of pay for networked employees

Answers

Answer:

the number of employees using each computer

the number of networked computers

the type of work done at networked computers

the ways in which employees share business documents

Explanation:

these are all correct on odyssey :)

Other Questions
A pea plants has two different alleles for flower no color, look at the picture and tell me what to put for the every bit of the graph, look at the photo and tell me what to put A rectangular room is 7 times as long as it's wide and it's perimeter is 64metres. Find the dimension of the room. help pleaseegiving brainliest Help !!!! I dont understand Solve for x: Plzzzzzzzzzz The graph shows the line y= -3x - 6.Complete the table so it includes two solutions to the equation. When Argentina fixed the exchange rate of their peso to the U.S. dollar, one outcome was: Group of answer choices Argentinean central bankers effectively gave control of their domestic interest rate to the FOMC. Argentinean central bankers regained control of their domestic interest rate. Argentinean central bankers were finally able to focus their attention on domestic monetary policy. Argentineans began using the U.S. dollar for all of their transactions. These box plots show the number of electoral votes won by Democratic andRepublican presidential candidates for the elections from 1984 through 2012Republican159170525Democratic2993675050100150400450500550200 250 300 350Electoral votesWhich statement best compares the spreads of the data sets? ou develop two types of PSAs (Public Service Announcements): one that uses a fear appeal to attempt to scare people into compliance and one that does not. You then show the fear ad to one group of people and the non-fear ad to another group. At the end of the experiment, you ask participants how effective the ad is. In this example, BECAUSE YOU SHOW THE AD TO TWO DIFFERENT GROUPS OF PEOPLE THIS IS A : Between-Subjects Design Within-Subjects Design Factorial Design How did changes in agriculture affectedworkers in the nineteenth century? Calculate the radius or diameter in each of the following problems. 1) d = 8.3 mmCalculate the radius of the circle. Suppose Hailey has taken four exams and made 86, 94, 76, and 81. If each exam counts equally, what does Hailey need to make on her fifth test to have an overall average of 85? 1. As we read through this section of the book describe the changing demographics and economics ofIdaho potato farmers over the past several decades (consider and discuss what has happened tothe number of potato farmers, the amount of land used for potato growing, the cost and profit orprice farmers obtain for their potatoes. Has the amount of potatoes grown in Idaho increased ordecreased? By how much? Discuss farm ownership vs employee status of potato farmers as well asany other aspects of potato farming logistics you find interesting,2. Many pre-prepared, fast food, restaurant, and snack foods, whether purchased in Missouri,California, or New Guinea have a consistent and reproducible homogenous taste and flavor. This ismade possible by the IFF (International Flavors and Fragrances Company). Discuss why processedfood manufacturers need to use "artificial or natural flavors" in producing their foods. The bookmentions a strong correlation between a person's early development of taste preference and thefoods and social situations that person was exposed to early in life. Also, smells and aromas canstrongly trigger memories and emotions in a person. Discuss briefly how the Fast Food Industrymight use this to influence the eating habits of certain segments of the population,What is the difference Malibu Corporation has monthly fixed costs of $59,000. It sells two products for which it has provided the following information. Sales Price Contribution Margin Product 1 $ 15 $ 9 Product 2 20 4 a. What total monthly sales revenue is required to break even if the relative sales mix is 30 percent for Product 1 and 70 percent for Product 2 ill give brainliest!!! please help! which is the country to use paper currency Hey this is juelz gautreaux parent and she has a hard time on math so i got brainly for her and does not work What is the value of the expression shown? 10 - 16:2[tex]10 - 16 \div 2[/tex] Which number completes the table for y = x^2?a.) -9b.) 9c.) 6d.) -6 what seven elements have the appearance and properties of a metal but behave like the non-metal in certain situations?