Sum using the + operator
Multiply
divide
subtract
Complex number where iota is denoted with j
Different ways of declaring variables.
a,b,c,d = 1,2,3,4
special characters in variables @,%,-,+
Can use an underscore for it though. _a is a valid variable name
Data types:
a. int
b. float
c. boolean or bool
d.string and various ways of declaring a string, concatenation a1 + a2
Type casting an int to string
Type casting from string to int is not valid
Taking input from the user.
Typecasting the input() function
Indexing in a string, negative indexing
Slicing in a string
Jum/Step in slicing
Reverse of a string
Item reassignment - mutability and immutability
Questions
Declare two variables,
x
andy
, and assign them integer values. Swap the values of these variables without using any temporary variable.Create a program that calculates the area of a rectangle. Take the length and width as inputs from the user and store them in variables. Calculate and display the area.
Write a Python program that converts temperatures from Celsius to Fahrenheit. Take the temperature in Celsius as input, store it in a variable, convert it to Fahrenheit, and display the result.
Given a string, reverse the order of characters using string slicing and print the reversed string.