subject

Nstructions When we read code and predict its output, it is called tracing code.

For this lesson, you will come up with your own challenging algorithm for other students to trace. It must contain at least 5 if statements and use at least one AND or OR boolean condition.

Note: Elif or else statements will not count - your statements must be if statements. Each if statement should use a unique
For this challenge, try reading 3 or 4 of your classmates' code as well. Trace their code and predict what it will output, then check the code by running it to see if you got it right, and submit your work for a grade

name = input("What's your name?")

if name == "no" or name == "NO" or name == "name":
print("That's not a name!")
else:
print("Hello " + name)

age = int(input("How old are you?"))

if age < 13:
print("Why are you on the Internet??")
elif age < 18:
print("High school's cool")
else:
print("Wow, a real adult!")

dogs = input("Do you like dogs?")

if dogs == "yes" or dogs == "YES":
fish = input("Do you also like fish?")

if fish == "yes" or fish == "YES":
print("What an animal lover!")
else:
print("Yeah, dogs are great!")
else:
cats = input("What about cats?")

if cats == "no" or cats == "NO":
print("Maybe horses or bunnies?")
else:
print("Cats are cool")

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:10
Match the terms in the hlookup syntax with their explanation. a. lookup value b. data table c. row index d. mode 1. name of the table that contains the value 2. specifies if an exact match must be found 3. value to be searched 4. name of the row that contains the value
Answers: 1
question
Computers and Technology, 22.06.2019 02:00
The word ‘play’ comes with many different interpretations and a variety of definitions. discuss some of the various meanings tied to the word play. why is the concept of play thought to be an important addition to the workplace? do some (brief) research online and give an example of how play in the workplace is being done right.
Answers: 2
question
Computers and Technology, 23.06.2019 20:50
3.11.3 quiz: comparing and analyzing function typesquestion 4 of 102 pointswhat can you say about the y-values of the two functions f(x) = 3x2-3 andg(x)=2* - 3?
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
Nstructions When we read code and predict its output, it is called tracing code.

For thi...
Questions
question
Mathematics, 18.06.2020 12:57
question
Mathematics, 18.06.2020 12:57
question
Mathematics, 18.06.2020 12:57
question
English, 18.06.2020 12:57
question
Chemistry, 18.06.2020 12:57
Questions on the website: 13722363