Posts

Showing posts with the label print

Design using programming language

Image
 Hey!! guys here is the code to java HEART PATEREN  public class HeartPattern { public static void main(String[] args) { final int size = 4; for (int m =0; m<size;m++) { for(int n=0;n<4*size;n++) { double pos1=Math.sqrt(Math.pow(m - size, 2) + Math.pow(n-size,2)); double pos2=Math.sqrt(Math.pow(m - size, 2) + Math.pow(n-3*size,2)); if(pos1<size+0.5 || pos2<size+0.5) { System.out.print('*'); } else { System.out.print(' '); } } System.out.print(System.lineSeparator()); } and make sure your using JAVA latest Version!!! python heart :

Python Programming

Image
 Python Programming  Introduction to python programming Python is a high-level, interpreted programming language known for its simplicity and versatility. It is widely used in various fields, from web development to data science, machine learning, automation, and more. This introduction will cover the basics of Python programming, including its features, installation, and core concepts. Program 1: write  a python program to demonstrate basic data types in python (here we have many other data types) sol:                  print ( "----int----" ) print ( "possible integer values" ) print ( 15 ) print (- 25 ) print ( 0o 15 ) print ( 0x 12a ) x = 2 x = int ( 2 ) print ( x ) print ( int ( 25.5 )) print ( int ( "25" )) print ( "operations on integers" ) print ( "arithmetic operatons" ) print ( 2 ** 3 ) print ( 2 * 3 ) print ( 20 / 3 ) print ( 10 // 3 ) print ( 10 + 3 ) print ( 10 - 3 ) print ( "mathematical function" ) print ( pow ( ...