logo

Crowdly

Browser

Додати до Chrome

CITS1401 Computational Thinking with Python (2025S1)

Шукаєте відповіді та рішення тестів для CITS1401 Computational Thinking with Python (2025S1)? Перегляньте нашу велику колекцію перевірених відповідей для CITS1401 Computational Thinking with Python (2025S1) в quiz.jinhong.org.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Which of the following are true?

If you want to learn anything from this question you should first try to use the documentation and/or the dir and help function to predict how the various methods will behave. You can then check your predictions by typing the expressions into the shell.

Important Note: It would be a good idea to spend a bit of time trying to understand what string methods are available, as you will need them repeatedly throughout the rest of this course. Sometimes, knowing about the existence of particular methods can save you hours of wasted effort trying to re-invent the wheel!

0%
0%
Переглянути це питання

A block of code is given below. Which of the subsequent code blocks are equivalent? Select ALL answer(s), and try to solve without checking your answer. You can assume all variables have already been declared as integers, and they are all unique numbers (i.e., no two variables will have the same value).

if (a > b) and (b < c):

if a > c:

print("largest is a")

else:

print("largest is c")

elif a < b:

if c < b:

print("largest is b")

else:

print("largest is c")

else:

print("largest is a")

0%
0%
0%
0%
0%
0%
Переглянути це питання

What is printed after executing the code below? Try to answer the question without trying it out!

a = 10

b = 15

if a > b:

    a += b

else:

    a += b * 2

if a < b:

    print("awesome!")

elif a > 20:

    print("great!")

else:

    print("nice!")

Переглянути це питання

Which of the following are syntactically INCORRECT (ie their syntax is INCORRECT for the Python programming language)? Select ALL answers. You may assume all variables have previously been declared.

Переглянути це питання
True / False: The below two statements are equivalent (assume that all variables have already been declared).

Statement 1: 

var1 != var2

Statement 2:

not var1 == var2
100%
0%
Переглянути це питання

Functions should also have clear and concise naming, so that users (such as yourself and your colleagues) will be able to understand what it does without having to go over the function in detail. Of course, they should also be syntactically correct. Select ALL functions names that are syntactically correct AND are of good style (i.e. readability).

Переглянути це питання
Переглянути це питання

Select all the variable names that are syntactically correct from the list below. Note: Here, the style of the variable names will not be checked (i.e. having a meaningful name), but only checking that Python will not give an error. 

Переглянути це питання

Look at the Python expressions below. What is the value of 'orange' when all those expressions are executed in that order?

You are welcome to use Python to check your answer, but try to solve it without using Python first.

apple = 15
pineapple = apple * 2 + 1
orange = apple + pineapple
orange = orange - (apple * 2)

Переглянути це питання

Which of the following are syntactically correct Python assignment statements? Here, you can assume all the variables are already defined. Select ALL that are correct.

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на quiz.jinhong.org?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome